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

Comparing BasiliskII/src/BeOS/timer_beos.cpp (file contents):
Revision 1.1 by cebix, 1999-10-03T14:16:25Z vs.
Revision 1.6 by cebix, 2001-02-02T20:52:57Z

# Line 1 | Line 1
1   /*
2   *  timer_beos.cpp - Time Manager emulation, BeOS specific stuff
3   *
4 < *  Basilisk II (C) 1997-1999 Christian Bauer
4 > *  Basilisk II (C) 1997-2001 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 44 | Line 44 | void Microseconds(uint32 &hi, uint32 &lo
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
48
47   uint32 TimerDateTime(void)
48   {
49 <        time_t uct_now = time(NULL);
50 <        struct tm tm;
51 <        localtime_r(&uct_now, &tm);
52 <        time_t local_now = mktime(&tm);
49 >        time_t utc_now = time(NULL);
50 >        long tz = timezone;
51 >        time_t local_now = utc_now - tz;
52 >        if (daylight)
53 >                local_now += 3600;
54          return (uint32)local_now + TIME_OFFSET;
55   }
56  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines