X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3c58c7ec012727bccf3c7ad5ee93200617b9a19..f90913e2ac7938728beed9065f34b7d4c7593513:/include/wx/datetime.h diff --git a/include/wx/datetime.h b/include/wx/datetime.h index c5f9f365df..c6aaa1fe39 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; } @@ -1031,12 +1037,21 @@ public: // conversion to/from text: all conversions from text return the pointer to // the next character following the date specification (i.e. the one where - // the scan had to stop) or NULL on failure. + // the scan had to stop) or NULL on failure; for the versions returning + // iterators, end iterator is returned instead of NULL // ------------------------------------------------------------------------ // parse a string in RFC 822 format (found e.g. in mail headers and // having the form "Wed, 10 Feb 1999 19:07:07 +0100") - const wxChar *ParseRfc822Date(const wxChar* date); + wxString::const_iterator ParseRfc822Date(const wxString& date); + const wchar_t *ParseRfc822Date(const wchar_t* date) + { + } + + const char *ParseRfc822Date(const char* date) + { + } + // parse a date/time in the given format (see strptime(3)), fill in // the missing (in the string) fields with the values of dateDef (by // default, they will not change if they had valid values or will @@ -1085,8 +1100,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