Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.1(EOL)
-
Linux hostname 3.10.0-327.13.1.el7.x86_64 #1 SMP Thu Mar 31 16:04:38 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Description
When datetime argument is out of 31 bit timestamp representable domain or would be represented as a 0, CONVERT_TZ silently returns the argument unchanged. Documentation at the time of writing does not mention such behavior.
Reproduction
Input
SELECT CONVERT_TZ('1970-01-01 00:00:00', '+00:00', @@session.time_zone) AS ``, |
CONVERT_TZ('1970-01-01 00:00:01', '+00:00', @@session.time_zone) AS ``, |
CONVERT_TZ('2038-01-19 03:14:07', '+00:00', @@session.time_zone) AS ``, |
CONVERT_TZ('2038-01-19 03:14:08', '+00:00', @@session.time_zone) AS `` |
Result
"" "" "" ""
|
1970-01-01 00:00:00 1970-01-01 03:00:01 2038-01-19 05:14:07 2038-01-19 03:14:08
|