Bug #51246 Timezone not correct calculated
Submitted: 17 Feb 2010 14:40 Modified: 19 Feb 2010 12:38
Reporter: Max Gaga Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Information schema Severity:S3 (Non-critical)
Version:mysql-server-5.4.2 OS:Any
Assigned to: CPU Architecture:Any
Tags: timezone

[17 Feb 2010 14:40] Max Gaga
Description:
I have installed the timezone data from my freeBSD into the mysql-server as described in the help pages.
So far it works, but not correct in all aspects. There are some funny exceptions in the past, which e.g. php can handle, but mysql not. 
During the 40's DST was on and off. Here a link to Wikipedia (sorry, in German): http://de.wikipedia.org/wiki/Sommerzeit#Schweiz
 

How to repeat:
You can test it yourself, test it for the years 1940-1943:

SELECT CONVERT_TZ('1941-09-01 19:05:00','Europe/Zurich','GMT');

<?php
date_default_timezone_set('Europe/Zurich');

$tz = new DateTime('1941-09-01 14:25:41');
echo $tz->getOffset()."\n";
?>
[19 Feb 2010 12:38] Susanne Ebrecht
Many thanks for writing a bug report but this is not a bug.

http://dev.mysql.com/doc/refman/5.1/en/datetime.html

" The TIMESTAMP data type has a range of '1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07' UTC. It has varying properties, depending on the MySQL version and the SQL mode the server is running in. These properties are described later in this section. "

It is also documented in German:

http://dev.mysql.com/doc/refman/5.1/de/datetime.html

" So kann ein TIMESTAMP-Wert nicht vor 1970 und nicht nach 2037 liegen "