arianhojat Posted April 27, 2007 Share Posted April 27, 2007 hmmm some of my times in a table were 1 hr early on 'manual entered' times. so users picks 5pm in an app, and it will enter the database as 5pm, but i just looked today and the time shows up as 4pm. Only thing i can think of is like restarting the Mysql server overnight, for some reason converts new times entered in databse 1hr behind? I just changed a time again today so i will see if tomorrow it will change. I assumed the DateInserted field would be definately off by 1hr since it used system time be4 we applied Windows D.S.T. patch. But i didnt know why the manual entered time by the user was 1 hr off. I ran this as a test (they should be the same value as some articles have pointed out): SELECT @@global.time_zone, @@session.time_zone, UNIX_TIMESTAMP('2007-03-11 02:00:00'), UNIX_TIMESTAMP('2007-03-11 03:00:00'); Results in: 'SYSTEM', 'SYSTEM', 1173596400, 1173600000 The 2 times are not the same. it is using SYSTEM time on win2000 IIS server with php5/MYSQL4.12. The daylight savings patch was applied, and time corrected, yet those 2 UNIX_TIMESTAMPS are off. Anyone know whats wrong on server? Link to comment https://forums.phpfreaks.com/topic/49002-my-datetimes-are-going-back-1-hr-after-insertion-daylight-savings-time-issue/ Share on other sites More sharing options...
fenway Posted April 30, 2007 Share Posted April 30, 2007 Are you sure it was patched correctly? Do other apps show this behaviour? Link to comment https://forums.phpfreaks.com/topic/49002-my-datetimes-are-going-back-1-hr-after-insertion-daylight-savings-time-issue/#findComment-241796 Share on other sites More sharing options...
arianhojat Posted May 1, 2007 Author Share Posted May 1, 2007 Whoops started a new Topic on this thread. we dont really have other apps people would notice chnages in for dates. Users notice this app since its very visible on intranet, the main calender for company. Well its Windows 2000, no update unless u pay for extended support. I think some company, Intellimon? i think its called, has a free tool to upgrade win2000 to DST changes, but the boss unsure about applying it. the values were shifting 1hr down from the time the user enters. now the user noticed some that are 1 hr down. its actually a timestamp field. MYSQL just stores the timestamp text once its in right? its not always dependant on a system value right, like if time changes on system, it adjusts itself after mysql server restarted? Link to comment https://forums.phpfreaks.com/topic/49002-my-datetimes-are-going-back-1-hr-after-insertion-daylight-savings-time-issue/#findComment-242727 Share on other sites More sharing options...
fenway Posted May 1, 2007 Share Posted May 1, 2007 The data in the table is never relative... but I was just wondering how you knew it was patched for sure. Link to comment https://forums.phpfreaks.com/topic/49002-my-datetimes-are-going-back-1-hr-after-insertion-daylight-savings-time-issue/#findComment-242871 Share on other sites More sharing options...
Recommended Posts