mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Implemented UTC_TIME, UTC_DATE and UTC_TIMESTAMP functions (WL#345)
This commit is contained in:
@@ -220,3 +220,12 @@ select date_add(date,INTERVAL "1 1:1:1" DAY_SECOND) from t1;
|
||||
# The following is not as one would expect...
|
||||
select date_add(time,INTERVAL 1 SECOND) from t1;
|
||||
drop table t1;
|
||||
|
||||
# Test SAPDB UTC_% functions. This part is TZ dependant (It is supposed that
|
||||
# TZ variable set to GMT-3
|
||||
select strcmp(date_sub(localtimestamp(), interval 3 hour), utc_timestamp())=0;
|
||||
select strcmp(date_format(date_sub(localtimestamp(), interval 3 hour),"%T"), utc_time())=0;
|
||||
select strcmp(date_format(date_sub(localtimestamp(), interval 3 hour),"%Y-%m-%d"), utc_date())=0;
|
||||
select strcmp(date_format(utc_timestamp(),"%T"), utc_time())=0;
|
||||
select strcmp(date_format(utc_timestamp(),"%Y-%m-%d"), utc_date())=0;
|
||||
select strcmp(concat(utc_date(),' ',utc_time()),utc_timestamp())=0;
|
||||
|
||||
Reference in New Issue
Block a user