Bug #64599 CONVERT_TZ fails to convert from GMT to system_time_zone
| Submitted: | 9 Mar 2012 7:32 | Modified: | 9 Mar 2012 17:36 |
|---|---|---|---|
| Reporter: | Mark Stafford | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
| Version: | 5.0.87, 5.6.5 | OS: | Linux |
| Assigned to: | CPU Architecture: | Any |
[9 Mar 2012 17:36]
Sveta Smirnova
Thank you for the report. This is actually not related to @@system_time_zone: mysql> select convert_tz(utc_timestamp(), 'GMT', 'PST'); +-------------------------------------------+ | convert_tz(utc_timestamp(), 'GMT', 'PST') | +-------------------------------------------+ | NULL | +-------------------------------------------+ 1 row in set (0.00 sec) But I agree warning must be issued, so set to "Verified".
[9 Mar 2012 17:39]
Sveta Smirnova
This looks similar to bug #12445, although in this case timezone tables were loaded.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: MySQL accepts values for system_time_zone that are not supported in the CONVERT_TZ function. How to repeat: Having populated the time zone information via mysql_tzinfo_to_sql and restarted the server the following call to convert_tz returns NULL: > select convert_tz(utc_timestamp(), 'GMT', 'PST8PDT') succeeds , convert_tz(utc_timestamp(), 'GMT', @@system_time_zone) fails , @@system_time_zone \G *************************** 1. row *************************** succeeds: 2012-03-08 23:30:40 fails: NULL @@system_time_zone: PST 1 row in set (0.00 sec) Suggested fix: Any system_time_zone value that is not acceptable for use in CONVERT_TZ should produce warning output. Either that or the output from mysql_tzinfo_to_sql may need to be expanded to include all acceptable values for system_time_zone.