Page 1 of 1

MySQL timezone configuration problem after update to 1.7.3

PostPosted: 17. May 2010 20:09
by Dacen
Hello,

I got a problem concerning the mysql configuration regarding the set timezone. I have a query which uses the function UNIX_TIMESTAMP on a datetime field, but it creates a unix timestamp which is 24 seconds to high.

During installation the timezone Europe/Paris was automatically recognized and set and I switched it to Europe/Berlin in php.ini and my.ini, but that didn't solve the problem. Here are some additional facts:
- I can get the correct unixtimestamp with the PHP function strtotime and then use http://www.unixtime.de to get the right string again.
- I can edit the value using HeidiSQL, but the value is alsways 24 seconds to high
- I visitied http://dev.mysql.com/doc/refman/5.1/en/timezone-problems.html, but I did not find any information, if "Europe/Berlin" is acceptable for windows (I googled using combination of "Windows, MySQL, timezones, identifier")
- I checked the current server used "timestamp" and "time_zone" value, which are both correct ("Europe/Berlin" is set and the timestamp is exactly the time on my computer)
- I updated the timezone tables (http://dev.mysql.com/downloads/timezones.html) and switch back changing nothing.

I have know additional ideas for solving this problem. One hour to high/low I would get, but not 24 seconds (Is it some calculated time difference between Berlin-Paris? I don't think so).

I would be happy for additional thoughts and ideas and maybe an solution to this problem

Thanks for reading.

Dacen

edit:
I noticed this post discribes the same problem: viewtopic.php?f=4&t=40427

Re: MySQL timezone configuration problem after update to 1.7.3

PostPosted: 17. May 2010 21:14
by Dacen
Ok i solved it myself by compairing configuration files from 1.7.1 and 1.7.3

default-time-zone is not part of the my.ini in 1.7.1. Therefore time_zone = 'SYSTEM' is assumed.
i commented it out in 1.7.3 and it solved the problem

Re: MySQL timezone configuration problem after update to 1.7.3

PostPosted: 17. May 2010 21:44
by Dacen
an again I am somewhat wrong. I just thougth about it:

why is the any addition to the time? I mean differences in time are only hour steps, not 24 seconds.
so where do thex come from?

any idea?

Re: MySQL timezone configuration problem after update to 1.7.3

PostPosted: 17. May 2010 22:17
by Dacen

Re: MySQL timezone configuration problem after update to 1.7.3

PostPosted: 18. May 2010 05:24
by Altrea
Thank you very much for this info!
I have never find a reason for this "problem"