19 |
|
*/ |
20 |
|
|
21 |
|
#include "sysdeps.h" |
22 |
+ |
#include "macos_util.h" |
23 |
|
#include "timer.h" |
24 |
|
|
25 |
|
#define DEBUG 0 |
58 |
|
|
59 |
|
uint32 TimerDateTime(void) |
60 |
|
{ |
61 |
< |
time_t utc_now = time(NULL); |
61 |
< |
#if defined(__linux__) || defined(__SVR4) |
62 |
< |
time_t local_now = utc_now - timezone; |
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; |
61 |
> |
return TimeToMacTime(time(NULL)); |
62 |
|
} |
63 |
|
|
64 |
|
|