X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aa0b7e1e64beaeada5234d73ca6a41781a2acc73..0d2a2b601b1994333886dff8f53d82a714c4042f:/src/common/time.cpp diff --git a/src/common/time.cpp b/src/common/time.cpp index c8a19d6395..3b9ce52b58 100644 --- a/src/common/time.cpp +++ b/src/common/time.cpp @@ -27,7 +27,7 @@ seconds since January 1, 1901, GMT. #include "wx/setup.h" -#if wxUSE_TIMEDATE +#ifdef wxUSE_TIMEDATE #include "wx/time.h" #include "wx/date.h" @@ -104,7 +104,11 @@ wxTime::wxTime() wxTimeInitialized = TRUE; } sec = wxGetCurrentTime(); +#ifdef __SALFORDC__ + sec += (unsigned long) 2177452800; /* seconds from 1/1/01 to 1/1/70 */ +#else sec += 2177452800UL; /* seconds from 1/1/01 to 1/1/70 */ +#endif } wxTime::wxTime(hourTy h, minuteTy m, secondTy s, bool dst) @@ -152,6 +156,7 @@ wxTime::wxTime(const wxDate& date, hourTy h, minuteTy m, secondTy s, bool dst) sec += TIME_ZONE; // adjust to GMT } +#ifndef __SALFORDC__ wxTime::operator wxDate() const /* Convert a wxTime to a local wxDate @@ -164,6 +169,7 @@ wxTime::operator wxDate() const date += daycount; return date; } +#endif bool wxTime::IsBetween(const wxTime& a, const wxTime& b) const { @@ -315,10 +321,12 @@ wxTime wxTime::Min(const wxTime& t) const return t; } +#ifndef __SALFORDC__ wxTime::operator char *(void) { return FormatTime(); } +#endif void wxTime::SetFormat(const wxTime::tFormat lFormat, const wxTime::tPrecision lPrecision) {