--- BasiliskII/src/Unix/timer_unix.cpp 1999/10/14 16:05:18 1.2 +++ BasiliskII/src/Unix/timer_unix.cpp 2000/02/21 20:04:18 1.6 @@ -50,15 +50,16 @@ void Microseconds(uint32 &hi, uint32 &lo * Return local date/time in Mac format (seconds since 1.1.1904) */ -const uint32 TIME_OFFSET = 0x7c25b080; // Offset Mac->Unix time in seconds - uint32 TimerDateTime(void) { - time_t uct_now = time(NULL); - long tz = timezone; - time_t local_now = uct_now - tz; - if (daylight) - local_now += 3600; + time_t utc_now = time(NULL); +#if defined(__linux__) || defined(__SVR4) + time_t local_now = utc_now - timezone; +#elif defined(__FreeBSD__) || defined(__NetBSD__) + time_t local_now = utc_now + localtime(&utc_now)->tm_gmtoff; +#else + time_t local_now = utc_now; +#endif return (uint32)local_now + TIME_OFFSET; }