| Bug #70436 | Incorrect mapping of windows timezone to Olson timezone | ||
|---|---|---|---|
| Submitted: | 26 Sep 2013 13:22 | Modified: | 12 Sep 2014 17:15 |
| Reporter: | Alexander Nalbandyan | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / J | Severity: | S2 (Serious) |
| Version: | 5.1.26 | OS: | Windows (7 x64/x86) |
| Assigned to: | Filipe Silva | CPU Architecture: | Any |
[26 Sep 2013 13:29]
Alexander Nalbandyan
Here is a link to cldr standard for windows timezone mapping. http://unicode.org/cldr/trac/browser/tags/release-1-8/common/supplemental/windowsZones.xml
[27 Sep 2013 10:10]
Filipe Silva
Hi Alexander, Thank you for this bug report. Verified by code review.
[12 Sep 2014 17:15]
Daniel So
Added the following entry to the Connector/J 5.1.33 changelog: "Errors occur when Connector/J mapped Windows time zones to Olson time zones for “Caucasus Standard Time” and “Georgian Standard Time”. This fix corrected and updated all the time-zone mappings in Connector/J using the data from the IANA Time Database and the Unicode Common Locale Data Repository (CLDR) v.24."
[18 Sep 2014 18:29]
Daniel So
Corrected the changelog entry to the following: Errors occur when Connector/J mapped Windows time zones to Olson time zones for “Caucasus Standard Time” and “Georgian Standard Time”. This fix corrected and updated all the time-zone mappings in Connector/J using the data from the IANA Time Database v.2014g and the Unicode Common Locale Data Repository (CLDR) v.25.

Description: Mysql jdbc driver maps windows timezone to oslon timezone incorrectly for following windows timezones. Current Mapping in JDBC driver: "Caucasus Standard Time" --> "Asia/Tbilisi" "Georgian Standard Time" --> no mapping Mapping according to Cldr Standard(Release 1.8 till 24): "Caucasus Standard Time" --> "Asia/Yerevan" "Georgian Standard Time" --> "Asia/Tbilisi" How to repeat: To reproduce this but set system timezone on windows to "Yerevan". And server_time_zone in mysql should be "SYSTEM". Use Jdbc connection property "useLegacyDatetimeCode=false". Try loading jdbc driver then ConnectionImpl.configuretimezone method this.serverVariables.get("system_time_zone");// "Caucasus Standard Time" (Correct) but TimeUtil.getCanoncialTimezone(); //Returns "Asia/Tbilisi" Incorrect. Also I would like to mention that in case of Tbilisi system timezone in Windows you get exception as there is no mapping. Suggested fix: Mappings should be fixed according to cldr Standard "Caucasus Standard Time" --> "Asia/Yerevan" "Georgian Standard Time" --> "Asia/Tbilisi"