summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_time.test
diff options
context:
space:
mode:
authordlenev@dlenev.mshome <>2003-08-11 23:43:01 +0400
committerdlenev@dlenev.mshome <>2003-08-11 23:43:01 +0400
commit921ac8af8b388a90b6c06db2de78dba1cd5a3950 (patch)
treebec2ab17e0424dac363d21f954738ff68f4fede9 /mysql-test/t/func_time.test
parenta60acfcfe09945c9dd7d326ab99d1df5715cba46 (diff)
downloadmariadb-git-921ac8af8b388a90b6c06db2de78dba1cd5a3950.tar.gz
Implemented UTC_TIME, UTC_DATE and UTC_TIMESTAMP functions (WL#345)
Diffstat (limited to 'mysql-test/t/func_time.test')
-rw-r--r--mysql-test/t/func_time.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index af222b0b3cc..4be6570d410 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -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;