![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a simple mySQL database on dedicated server.. In last two weeks I experienced strange behaviour resulting in changes in all my timestamp fields (in all tables in database)! Even though my admin says he didn't change any timezone settings or similar things, after server reboot all my timestamps were moved for -06:00 Resulting in complete confusion of my customers data How is that possible? Any setting that could be disabled? I just want to store timestamp data I insert from my clients (their local times)... |
|
Faith does not, in fact, move mountains; Mainly because they won't let her loose with a drilling crew and enough |
#3
| ||||
| ||||
|
|
I have a simple mySQL database on dedicated server.. In last two weeks I experienced strange behaviour resulting in changes in all my timestamp fields (in all tables in database)! Even though my admin says he didn't change any timezone settings or similar things, after server reboot all my timestamps were moved for -06:00 Resulting in complete confusion of my customers data How is that possible? Any setting that could be disabled? I just want to store timestamp data I insert from my clients (their local times)... |
|
Variable_name | Value | +---------------+--------+ time_zone | SYSTEM | +---------------+--------+ |
|
now() | +---------------------+ 2011-12-20 21:53:21 | +---------------------+ |
|
now() | +---------------------+ 2011-12-20 12:53:35 | +---------------------+ |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
My admin informed me (at first problem appearance) that there were no time zone changes (since that's first thing I would thought of)... So, I manually restored from backup at first issue etc. However, the issue reappeared today and I lost patience... It must be server related change of timezone... mySQL time zone is SYSTEM, so basically system time zone change invokes changes to all timestamps obtained from db.... As much I understand, it can only happen due system time zone change.. But admin claims he didn't make any changes recently... So, I will have to add SET time_zone to all my application queries (desktop app connecting to remote server) in order to get proper values... Maybe that should be some proper principle always when using mySQL server. I found it a wise precaution when STORING data and a wiser one when |
#6
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |