mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-26 16:31:11 +00:00
- corrected time zone handling in TimerDateTime()
This commit is contained in:
parent
62aff59d79
commit
289f0a588a
@ -1,10 +1,13 @@
|
||||
V0.7 -
|
||||
- sony.cpp/disk.cpp/cdrom.cpp: disk insertions are now checked for
|
||||
by an interrupt routine
|
||||
- Localizable strings are now split into a common and a platform-
|
||||
- localizable strings are now split into a common and a platform-
|
||||
specific set
|
||||
- AmigaOS/clip_amiga.cpp: fixed small bug in CR->LF translation
|
||||
[Giacomo Magnini]
|
||||
- added patches for NetBSD [Bernd Sieker]
|
||||
- corrected TimerDateTime() in timer_unix.cpp and timer_beos.cpp
|
||||
[Toshimitsu Tanaka]
|
||||
|
||||
V0.7 (release 0.7-2) - 6.Oct.1999
|
||||
- Added BasiliskII.spec for making RPMs [with assistance from
|
||||
|
@ -44,14 +44,15 @@ void Microseconds(uint32 &hi, uint32 &lo)
|
||||
* Return local date/time in Mac format (seconds since 1.1.1904)
|
||||
*/
|
||||
|
||||
const uint32 TIME_OFFSET = 0x7c25cca0; // Offset Mac->BeOS time in seconds
|
||||
const uint32 TIME_OFFSET = 0x7c25b080; // Offset Mac->BeOS time in seconds
|
||||
|
||||
uint32 TimerDateTime(void)
|
||||
{
|
||||
time_t uct_now = time(NULL);
|
||||
struct tm tm;
|
||||
localtime_r(&uct_now, &tm);
|
||||
time_t local_now = mktime(&tm);
|
||||
long tz = timezone;
|
||||
time_t local_now = uct_now - tz;
|
||||
if (daylight)
|
||||
local_now += 3600;
|
||||
return (uint32)local_now + TIME_OFFSET;
|
||||
}
|
||||
|
||||
|
@ -50,14 +50,15 @@ void Microseconds(uint32 &hi, uint32 &lo)
|
||||
* Return local date/time in Mac format (seconds since 1.1.1904)
|
||||
*/
|
||||
|
||||
const uint32 TIME_OFFSET = 0x7c25cca0; // Offset Mac->Unix time in seconds
|
||||
const uint32 TIME_OFFSET = 0x7c25b080; // Offset Mac->Unix time in seconds
|
||||
|
||||
uint32 TimerDateTime(void)
|
||||
{
|
||||
time_t uct_now = time(NULL);
|
||||
struct tm tm;
|
||||
localtime_r(&uct_now, &tm);
|
||||
time_t local_now = mktime(&tm);
|
||||
long tz = timezone;
|
||||
time_t local_now = uct_now - tz;
|
||||
if (daylight)
|
||||
local_now += 3600;
|
||||
return (uint32)local_now + TIME_OFFSET;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user