X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3c58c7ec012727bccf3c7ad5ee93200617b9a19..b23bc769d3d1943ca2b02ca90701d86b00880af9:/include/wx/datetime.h diff --git a/include/wx/datetime.h b/include/wx/datetime.h index c5f9f365df..4d78cf7ffc 100644 --- a/include/wx/datetime.h +++ b/include/wx/datetime.h @@ -37,11 +37,8 @@ class WXDLLIMPEXP_FWD_BASE wxDateSpan; // set this to the corresponding value in seconds 1/1/1970 has on your // systems c-runtime -#if defined(__WXMAC__) && !defined(__DARWIN__) && __MSL__ < 0x6000 - #define WX_TIME_BASE_OFFSET ( 2082844800L + 126144000L ) -#else - #define WX_TIME_BASE_OFFSET 0 -#endif +#define WX_TIME_BASE_OFFSET 0 + /* * TODO * @@ -421,7 +418,16 @@ public: { public: TimeZone(TZ tz); - TimeZone(wxDateTime_t offset = 0) { m_offset = offset; } + + // create time zone object with the given offset + TimeZone(long offset = 0) { m_offset = offset; } + + static TimeZone Make(long offset) + { + TimeZone tz; + tz.m_offset = offset; + return tz; + } long GetOffset() const { return m_offset; } @@ -1085,8 +1091,8 @@ public: // another one to get the current time broken down static struct tm *GetTmNow() { - time_t t = GetTimeNow(); - return localtime(&t); + static struct tm l_CurrentTime; + return GetTmNow(&l_CurrentTime); } // get current time using thread-safe function