-extern long wxGetUTCTime(void);
-bool wxGetTZandDST(long *timeZone, int *dstObserved)
-{
- time_t now;
- struct tm *tm;
-
- now = time((time_t *) NULL);
-
- if (now != (time_t)-1)
- {
- tm = localtime(&now);
-
- if ((tm) && (tm->tm_isdst > 0))
- *dstObserved = 1;
- }
- *timeZone = WX_TIMEZONE;
-
- return TRUE;
-}
-
-
-static long TIME_ZONE; /* seconds west of GMT */
-static int DST_OBSERVED; /* flags U.S. daylight saving time observed */
-
-static bool wxTimeInitialized = FALSE;
-
-wxTime::tFormat wxTime::Format = wxTime::wx12h;
-wxTime::tPrecision wxTime::Precision = wxTime::wxStdMinSec;
-
-static const unsigned long seconds_in_day = 24*60*60L;
-static const wxDate refDate(1,1,1901);
-// static const wxDate maxDate(49709L); /* ((2**32)-1)/seconds_in_day -1 */
-
-wxTime wxTime::GetLocalTime(const wxDate& date, hourTy h, minuteTy m, secondTy s)
-/*
- Return a local wxTime for the specified Standard Time date, hour, minute,
- and second.
-*/
-{
- if (!wxTimeInitialized)
- {
- wxGetTZandDST(&TIME_ZONE, &DST_OBSERVED);
- wxTimeInitialized = TRUE;
- }
-/*
- if (!date.IsBetween(refDate,maxDate))
- setError(NIHCL_DATERANGE,DEFAULT,
- date.dayOfMonth(),date.nameOfMonth(),date.year());
-*/
- // The following line causes an error in GCC 2.1
-// long daysBetween = date-refDate;
- // ... but this seems to get round it.
- wxDate tmp1(date);
- wxDate tmp2(refDate);
- long daysBetween = tmp1 - tmp2;
-
- return wxTime(seconds_in_day*daysBetween + 60*60L*h + 60*m + s);
-}