windows xp localtime daylight savings time problem
My XP system with service pack 2 seems to have transitioned to normal non-daylight time BUT the C++ time routines have not. The Date and Time Properties tool tel开发者_JAVA百科ls me it is now 5:26AM CST BUT localtime() and strftime() think it is 6:26CDT. I have relinked the app and restarted the system since the daylight switch to no avail. If I unclick the 'Automatically adjust clock for daylight saving changes' check box in the Date and Time Properties Time Zone tab, the c++ routines return the CST values. I admittedly do have an old 2002 XP and Visual Studio.
Probably the actual answer
Ah you have a much older version of Win XP. I suspect you do not have a version of Windows XP that was updated to the latest DST dates (they changed in 2007) or somehow its not functioning correctly. I would look into this hotfix.
Here's a blog post about the changes for the CRT
精彩评论