44 |
|
* Return local date/time in Mac format (seconds since 1.1.1904) |
45 |
|
*/ |
46 |
|
|
47 |
< |
const uint32 TIME_OFFSET = 0x7c25cca0; // Offset Mac->BeOS time in seconds |
47 |
> |
const uint32 TIME_OFFSET = 0x7c25b080; // Offset Mac->BeOS time in seconds |
48 |
|
|
49 |
|
uint32 TimerDateTime(void) |
50 |
|
{ |
51 |
|
time_t uct_now = time(NULL); |
52 |
< |
struct tm tm; |
53 |
< |
localtime_r(&uct_now, &tm); |
54 |
< |
time_t local_now = mktime(&tm); |
52 |
> |
long tz = timezone; |
53 |
> |
time_t local_now = uct_now - tz; |
54 |
> |
if (daylight) |
55 |
> |
local_now += 3600; |
56 |
|
return (uint32)local_now + TIME_OFFSET; |
57 |
|
} |
58 |
|
|