projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed wxEncodingConverter::Convert docs
[wxWidgets.git]
/
src
/
common
/
datetime.cpp
diff --git
a/src/common/datetime.cpp
b/src/common/datetime.cpp
index 23080fef24752804d61d316ba2f21cd7ea130159..418a72f51c89faad35ac925dcfc6396774254732 100644
(file)
--- a/
src/common/datetime.cpp
+++ b/
src/common/datetime.cpp
@@
-102,14
+102,20
@@
#define WX_TIMEZONE _timezone
#elif defined(__MWERKS__)
long wxmw_timezone = 28800;
#define WX_TIMEZONE _timezone
#elif defined(__MWERKS__)
long wxmw_timezone = 28800;
- #define WX_TIMEZONE wxmw_timezone
;
+ #define WX_TIMEZONE wxmw_timezone
#elif defined(__DJGPP__)
#include <sys/timeb.h>
#elif defined(__DJGPP__)
#include <sys/timeb.h>
+ #include <values.h>
static long wxGetTimeZone()
{
static long wxGetTimeZone()
{
- struct timeb tb;
- ftime(&tb);
- return tb.timezone;
+ static long timezone = MAXLONG; // invalid timezone
+ if (timezone == MAXLONG)
+ {
+ struct timeb tb;
+ ftime(&tb);
+ timezone = tb.timezone;
+ }
+ return timezone;
}
#define WX_TIMEZONE wxGetTimeZone()
#else // unknown platform - try timezone
}
#define WX_TIMEZONE wxGetTimeZone()
#else // unknown platform - try timezone
@@
-205,10
+211,7
@@
static const wxDateTime::wxDateTime_t gs_cumulatedDays[2][MONTHS_IN_YEAR] =
// in the fine tradition of ANSI C we use our equivalent of (time_t)-1 to
// indicate an invalid wxDateTime object
// in the fine tradition of ANSI C we use our equivalent of (time_t)-1 to
// indicate an invalid wxDateTime object
-
-static const wxDateTime gs_dtDefault;
-
-const wxDateTime& wxDefaultDateTime = gs_dtDefault;
+const wxDateTime wxDefaultDateTime;
wxDateTime::Country wxDateTime::ms_country = wxDateTime::Country_Unknown;
wxDateTime::Country wxDateTime::ms_country = wxDateTime::Country_Unknown;