ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/timer_unix.cpp
(Generate patch)

Comparing BasiliskII/src/Unix/timer_unix.cpp (file contents):
Revision 1.1 by cebix, 1999-10-03T14:16:25Z vs.
Revision 1.2 by cebix, 1999-10-14T16:05:18Z

# Line 50 | Line 50 | void Microseconds(uint32 &hi, uint32 &lo
50   *  Return local date/time in Mac format (seconds since 1.1.1904)
51   */
52  
53 < const uint32 TIME_OFFSET = 0x7c25cca0;  // Offset Mac->Unix time in seconds
53 > const uint32 TIME_OFFSET = 0x7c25b080;  // Offset Mac->Unix time in seconds
54  
55   uint32 TimerDateTime(void)
56   {
57          time_t uct_now = time(NULL);
58 <        struct tm tm;
59 <        localtime_r(&uct_now, &tm);
60 <        time_t local_now = mktime(&tm);
58 >        long tz = timezone;
59 >        time_t local_now = uct_now - tz;
60 >        if (daylight)
61 >                local_now += 3600;
62          return (uint32)local_now + TIME_OFFSET;
63   }
64  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines