Bug #66681 Timezone support on Windows
Submitted: 4 Sep 2012 12:31 Modified: 5 Sep 2012 20:16
Reporter: Peter Laursen (Basic Quality Contributor) Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:any OS:Windows
Assigned to: CPU Architecture:Any

[4 Sep 2012 12:31] Peter Laursen
Description:
http://dev.mysql.com/downloads/timezones.html
http://dev.mysql.com/doc/refman/5.5/en/mysql-tzinfo-to-sql.html

and inspired by this other bug report http://bugs.mysql.com/bug.php?id=66678.

The timezome name on my Windows 7 (Danish) system is 'Rom, sommertid' - not 'Europe/Rome' as shipped with the donload package in 1st link above

How to repeat:
I have downloaded and installed the package from first link.

SELECT * FROM `mysql`.`time_zone_name` WHERE `name` LIKE '%rom%'
/*
Name         Time_zone_id  
-----------  --------------
Europe/Rome             449
*/

-- query
SELECT 
 @@global.time_zone, 
 @@global.system_time_zone, 
 CONVERT_TZ(NOW(),@@global.time_zone, 'US/Central'),  
 CONVERT_TZ(NOW(),'Rom, sommertid', 'US/Central');
 
/* result
 SYSTEM              
 Rom, sommertid             
 2012-09-04 07:11:22                                 
 (NULL)   -- < note this
*/

-- But

SELECT 
 @@global.time_zone, 
 @@global.system_time_zone, 
 CONVERT_TZ(NOW(),@@global.time_zone, 'US/Central'),  
 CONVERT_TZ(NOW(),'Europe/Rome', 'US/Central');
-- works as expected - no NULL in result.

Suggested fix:
Provide timezone names supported on Windows or document how to generate them from Windows. Neither links above has any hint for Windows users.

(I don't find this a duplicate of the other bug but you can change that if you think it is better)
[5 Sep 2012 19:40] Sveta Smirnova
Thank you for the report.

This is not Windows issue. Look at the output from my Linux machine:

mysql> SELECT   @@global.time_zone,   @@global.system_time_zone;+--------------------+---------------------------+
| @@global.time_zone | @@global.system_time_zone |
+--------------------+---------------------------+
| SYSTEM             | EEST                      |
+--------------------+---------------------------+
1 row in set (0.00 sec)

mysql> select * from mysql.time_zone_name where name like '%EEST%';
Empty set (0.00 sec)

This is issue of how OS timezones stored. Please also note select CONVERT_TZ(NOW(),'SYSTEM', 'US/Central'); perfectly works and returns correct results.

So this can be either "Not a Bug" or documentation request.
[5 Sep 2012 20:16] Sveta Smirnova
Reporter of bug #66678 complains, so I verified it as documentation bug and set this as duplicate: they are really about same thing.