Strange behavior with CDateTimeCtrl
I'm using MSVC++ 6 in Windows XP Pro SP2, and trying to write a simple dialog with a date/time picker control, and am experiencing some strange behavior; when I try to UpdateData() after entering a time in the control, the last assertion in the following CTime constructor fails, even though all input fields appear valid:
Code:
CTime::CTime(int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, int nDST)
In particular, this assertion fails for any time earlier than 6 PM. I suspected that my time zone setting might be influencing the problem, so I set my time zone to GMT, and indeed the error vanished.
Obviously I can't insist my users set their time zone to GMT before running my program - is there something obvious I've missed? Are my MFC source files simply outdated, and if so, is a new version freely available? Thanks for your help.