Commit 63da557e authored by Rucha Deodhar's avatar Rucha Deodhar

MDEV-31684: More tests

parent 6f55cb4b
...@@ -592,6 +592,39 @@ SELECT DATE_FORMAT('2009-10-04 22:23:00', '%z %Z') AS current_timezone; ...@@ -592,6 +592,39 @@ SELECT DATE_FORMAT('2009-10-04 22:23:00', '%z %Z') AS current_timezone;
current_timezone current_timezone
+0000 UTC +0000 UTC
SET @@time_zone= @old_timezone; SET @@time_zone= @old_timezone;
# More timezone test:
#
# Check for time zone with leap seconds
#
set time_zone='Europe/Moscow';
SELECT DATE_FORMAT('2023-03-01 01:30:00', '%z %Z');
DATE_FORMAT('2023-03-01 01:30:00', '%z %Z')
+0300 MSK
SELECT DATE_FORMAT('2023-04-01 01:30:00', '%z %Z');
DATE_FORMAT('2023-04-01 01:30:00', '%z %Z')
+0400 MSD
set time_zone='leap/Europe/Moscow';
SELECT DATE_FORMAT('2023-03-01 01:30:00', '%z %Z');
DATE_FORMAT('2023-03-01 01:30:00', '%z %Z')
+0300 MSK
SELECT DATE_FORMAT('2023-04-01 01:30:00', '%z %Z');
DATE_FORMAT('2023-04-01 01:30:00', '%z %Z')
+0400 MSD
#
# Values around and in spring time-gap
#
set time_zone='MET';
# Normal value with DST
SELECT DATE_FORMAT('2003-03-30 01:59:59', '%z %Z');
DATE_FORMAT('2003-03-30 01:59:59', '%z %Z')
+0100 MET
# Values around and in spring time-gap
SELECT DATE_FORMAT('2023-03-26 01:59:59', '%z %Z');
DATE_FORMAT('2023-03-26 01:59:59', '%z %Z')
+0100 MET
SELECT DATE_FORMAT('2023-03-26 03:00:00', '%z %Z');
DATE_FORMAT('2023-03-26 03:00:00', '%z %Z')
+0200 MEST
# #
# End of 11.3 test # End of 11.3 test
# #
...@@ -294,6 +294,34 @@ SELECT DATE_FORMAT('2009-10-04 22:23:00', '%z %Z') AS current_timezone; ...@@ -294,6 +294,34 @@ SELECT DATE_FORMAT('2009-10-04 22:23:00', '%z %Z') AS current_timezone;
SET @@time_zone= @old_timezone; SET @@time_zone= @old_timezone;
--echo # More timezone test:
--echo #
--echo # Check for time zone with leap seconds
--echo #
set time_zone='Europe/Moscow';
SELECT DATE_FORMAT('2023-03-01 01:30:00', '%z %Z');
SELECT DATE_FORMAT('2023-04-01 01:30:00', '%z %Z');
set time_zone='leap/Europe/Moscow';
SELECT DATE_FORMAT('2023-03-01 01:30:00', '%z %Z');
SELECT DATE_FORMAT('2023-04-01 01:30:00', '%z %Z');
--echo #
--echo # Values around and in spring time-gap
--echo #
set time_zone='MET';
--echo # Normal value with DST
SELECT DATE_FORMAT('2003-03-30 01:59:59', '%z %Z');
--echo # Values around and in spring time-gap
SELECT DATE_FORMAT('2023-03-26 01:59:59', '%z %Z');
SELECT DATE_FORMAT('2023-03-26 03:00:00', '%z %Z');
--echo # --echo #
--echo # End of 11.3 test --echo # End of 11.3 test
--echo # --echo #
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment