Bug #36662 TimeUtil.java: MEST mapping n/a
Submitted: 12 May 2008 5:58 Modified: 25 May 2012 20:38
Reporter: Jens Elkner Email Updates:
Status: Closed Impact on me:
Category:Connector / J Severity:S3 (Non-critical)
Version:5.1.6 OS:Any
Assigned to: CPU Architecture:Any

[12 May 2008 5:58] Jens Elkner
useLegacyTimedateCode=false is really a HUGHE step in the right direction and will fix a lot of developers headaches.

Unfortunately, the MEST aka CEST timezone mapping is missing and thus ConnectionImpl.java:configureTimezone() throws an exception and makes connecting to the database impossible.

Furthermore there is no need to duplicate mappings and should be avoided to save memory. E.g. for MET aka CET aka CEST aka MEST it would save 336 byte on 64bit and would make maintanance of those mappings easier ...

BTW: I've seen some cases, where calendars gets created/looked up even so the are actually not used, if useLegacyTimedateCode=false is set. (e.g. in ResultSetImpl.java). Eleminating these may lead to some small? performance improvements ...

Last but not least, you should document the key feature "useLegacyTimedateCode=false" a little bit deeper. I.e. no need to care about noTimezoneConversionForTimeType, useJDBCCompliantTimezoneShift, useSSPSCompatibleTimezoneShift, useGmtMillisForDatetimes, useTimezone, zeroDateTimeBehavior, noDatetimeStringSync [if useFastDateParsing=true] anymore ...

How to repeat:
- useLegacyTimedateCode=false
- leave ServerTimezone unset
- set server TZ to MET

and try to connect

Suggested fix:
tempMap.put("CEST", tempMap.get("CET"));
tempMap.put("MET", tempMap.get("CET"));
tempMap.put("MEST", tempMap.get("CET"));
[12 May 2008 6:54] Tonci Grgin
Hi Jens and thanks for your report(s).

Looking into latest sources (rev. 6771) I've found that only MEST is missing from mapping. I can not locate exact change in this java file so I'm wondering if it's possible for you to check existence in your sources? Also, can you try fetching sources from our public SVN repo and retest?
[14 May 2008 6:39] Jens Elkner
Hi Tonci,

yes, only MEST is missing. The others like tempMap.put("CEST", tempMap.get("CET")) etc. are just suggestions, how one could space optimize those maps without any performance degration.
[16 May 2008 10:10] Tonci Grgin
Jens, please forgive me, sometimes I just get lost in all those languages, frameworks...

Of course, verified just like described by looking into sources. Workaround provided.

Thanks for your interest in MySQL.
[25 May 2012 20:38] John Russell
Added to changelog for 5.1.21: 

The timezone entry was missing for "MEST - Middle European Summer