Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
63da557e
Commit
63da557e
authored
Oct 12, 2023
by
Rucha Deodhar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-31684: More tests
parent
6f55cb4b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
0 deletions
+61
-0
mysql-test/main/date_formats.result
mysql-test/main/date_formats.result
+33
-0
mysql-test/main/date_formats.test
mysql-test/main/date_formats.test
+28
-0
No files found.
mysql-test/main/date_formats.result
View file @
63da557e
...
...
@@ -592,6 +592,39 @@ SELECT DATE_FORMAT('2009-10-04 22:23:00', '%z %Z') AS current_timezone;
current_timezone
+0000 UTC
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
#
mysql-test/main/date_formats.test
View file @
63da557e
...
...
@@ -294,6 +294,34 @@ SELECT DATE_FORMAT('2009-10-04 22:23:00', '%z %Z') AS current_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
# End of 11.3 test
--
echo
#
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment