# | Line 54 | Line 54 | const uint32 TIME_OFFSET = 0x7c25b080; / | |
---|---|---|
54 | ||
55 | uint32 TimerDateTime(void) | |
56 | { | |
57 | < | time_t uct_now = time(NULL); |
57 | > | time_t utc_now = time(NULL); |
58 | > | #if defined(__linux__) || defined(__SVR4) |
59 | long tz = timezone; | |
60 | time_t local_now = uct_now - tz; | |
61 | if (daylight) | |
62 | local_now += 3600; | |
63 | + | #elif defined(__FreeBSD__) || defined(__NetBSD__) |
64 | + | time_t local_now = utc_now + localtime(&utc_now)->tm_gmtoff; |
65 | + | #else |
66 | + | time_t local_now = utc_now; |
67 | + | #endif |
68 | return (uint32)local_now + TIME_OFFSET; | |
69 | } | |
70 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |