Hi, Vladislav! On Jun 14, Vladislav Vaintroub wrote:
At file:///H:/bzr/5.5/
revno: 3434 revision-id: wlad@montyprogram.com-20120614122958-bq20w9xbqjw032nk parent: wlad@montyprogram.com-20120613093751-tv67fxuh1qcxm0by fixes bug: https://launchpad.net/bugs/1001340 committer: Vladislav Vaintroub <wlad@montyprogram.com> branch nick: 5.5 timestamp: Thu 2012-06-14 14:29:58 +0200 message: MDEV-339, LP1001340 - system_time_zone is wrong on Windows
On localized Windows versions, Windows uses localized time zone names. Since characters in timezone name can be outside of ASCII range, thus not every client would be able to read variable without loosing information, and even server misinterprets the encoding (it does not try to interpret the encoding).
The fix is to use the UTC offset format "+/-hh:mm" for system_time_zone on Windows, compatible with time_zone values everywhere else. UTC offset format is however not used if TZ environment variable is defined - MySQL documents to handle TZ environment variable in OS-dependent way.
I am not sure I like this idea. UTC offset format specifies a *different* time zone. Not the system one. Timezone that surely produces different results for the historical dates. Original bug report says that system_time_zone value is not a valid MySQL (or POSIX) time zone name. But is it a problem? When time_zone is set to SYSTEM, MariaDB will use OS functions for date/time conversion, and not the data from timezone tables. So it will use the system time zone *exactly*, not UTC offset approximation. And it won't try to look up system_time_zone value in the timezone tables. So, I think, it's quite ok for system_time_zone to have "Westeuropäische Sommerzeit" value. You only need to fix the charset/truncation issue and that's all. Regards, Sergei