Negligence Posted November 6, 2007 Share Posted November 6, 2007 I recently noticed that the recorded times in my software had shifted back one hour, presumably along with the recent DST change on Sunday. I looked into it more and the changes do in fact seem to coincide with the DST change. However, I am not sure why this is the case because the date/time were manually entered into the database and were not in sync with the actual time -- they do not rely on the system time, and they should not be updated. They are simply static values stored in a DATETIME field. But the record values actually did change. Does anyone know what can be done? I've got thousands of records that have been affected by this, and it was quite unexpected. What are my options? Thank you in advance. Quote Link to comment Share on other sites More sharing options...
fenway Posted November 6, 2007 Share Posted November 6, 2007 Check your server settings as far as time zones are concerned; check mysql, too. Quote Link to comment Share on other sites More sharing options...
Negligence Posted November 6, 2007 Author Share Posted November 6, 2007 My server is running the correct time zone (GMT -500), and the MySQL was timezone was set to SYSTEM. Quote Link to comment Share on other sites More sharing options...
Negligence Posted November 6, 2007 Author Share Posted November 6, 2007 As an amendment: when I checked the server time today, it was in fact one hour off and not running the correct time. Quote Link to comment Share on other sites More sharing options...
fenway Posted November 6, 2007 Share Posted November 6, 2007 As an amendment: when I checked the server time today, it was in fact one hour off and not running the correct time. Linux will adjust this for you -- when you say one hour off, you mean dcorrectly adjusted for dst? Quote Link to comment Share on other sites More sharing options...
Negligence Posted November 6, 2007 Author Share Posted November 6, 2007 Sorry, I meant it was still running the pre-DST time. I had to manually set the system clock one hour back to be correct. Quote Link to comment Share on other sites More sharing options...
fenway Posted November 6, 2007 Share Posted November 6, 2007 So when it saved the "wrong" times, it thought it was right? Quote Link to comment Share on other sites More sharing options...
Negligence Posted November 6, 2007 Author Share Posted November 6, 2007 The records were actually created long ago with a datetime value of something after November 4th/2007. Following the DST change, any datetime values with a date of something later than November 4th had somehow been adjusted to be one hour less (records set for November 9th and 11:00am are now November 9th 10:00am). I really do not understand what has happened here since this is the first time I've encountered such a situation. Quote Link to comment Share on other sites More sharing options...
fenway Posted November 6, 2007 Share Posted November 6, 2007 Yes, well, this is around the DST changeover date. I'm confused as to exactly what is happening now. Quote Link to comment Share on other sites More sharing options...
Negligence Posted November 6, 2007 Author Share Posted November 6, 2007 The problem is that the DST change affected the data which had been previously entered. DST should not have affected any legacy data. Those datetime fields were only meant to store a specific date and time (October 11th, 2pm) and never be affected by a DST change, timezone, or anything similar. Obviously it has been modified, somehow, and now I have the problem of figuring out why it adjusted the datetime fields in the first place, and how I can reverse the effects. Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted November 7, 2007 Share Posted November 7, 2007 Are you saying that something made the records already in the mysql get changed? - If that is the case, either you are doing it by mistake or you have a hacker in the area! Quote Link to comment Share on other sites More sharing options...
fenway Posted November 7, 2007 Share Posted November 7, 2007 The problem is that the DST change affected the data which had been previously entered. DST should not have affected any legacy data. I have a hard time believeing that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.