git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38702
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
and WXK*PAGEDOWN. If you have switch statements that use both
constants from a set then you need to remove the PRIOR/NEXT
versions in order to eliminate compiler errors.
and WXK*PAGEDOWN. If you have switch statements that use both
constants from a set then you need to remove the PRIOR/NEXT
versions in order to eliminate compiler errors.
+- Fixed bug where wxDateTime::Now() would sometimes return an incorrect value
+ the first time it was called.
// (in seconds)
static int GetTimeZone()
{
// (in seconds)
static int GetTimeZone()
{
// set to true when the timezone is set
static bool s_timezoneSet = false;
static long gmtoffset = LONG_MAX; // invalid timezone
// set to true when the timezone is set
static bool s_timezoneSet = false;
static long gmtoffset = LONG_MAX; // invalid timezone
tm = wxLocaltime_r(&t, &tmstruct);
s_timezoneSet = true;
tm = wxLocaltime_r(&t, &tmstruct);
s_timezoneSet = true;
// note that GMT offset is the opposite of time zone and so to return
// consistent results in both WX_GMTOFF_IN_TM and !WX_GMTOFF_IN_TM
// cases we have to negate it
gmtoffset = -tm->tm_gmtoff;
// note that GMT offset is the opposite of time zone and so to return
// consistent results in both WX_GMTOFF_IN_TM and !WX_GMTOFF_IN_TM
// cases we have to negate it
gmtoffset = -tm->tm_gmtoff;
+#else // !WX_GMTOFF_IN_TM
+ gmtoffset = WX_TIMEZONE;
+#endif // WX_GMTOFF_IN_TM/!WX_GMTOFF_IN_TM
-#else // !WX_GMTOFF_IN_TM
- return (int)WX_TIMEZONE;
-#endif // WX_GMTOFF_IN_TM/!WX_GMTOFF_IN_TM
}
// return the integral part of the JDN for the midnight of the given date (to
}
// return the integral part of the JDN for the midnight of the given date (to