mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-03-02 13:29:24 +00:00
- Unix: changed time zone handling (again)
This commit is contained in:
parent
e7c9a80182
commit
1efa7490cf
@ -1,5 +1,6 @@
|
|||||||
V0.8 -
|
V0.8 -
|
||||||
- Unix/video_x.cpp: new window refresh code [Samuel Lander]
|
- Unix/video_x.cpp: new window refresh code [Samuel Lander]
|
||||||
|
- Unix/timer_unix.cpp: fixed time zone handling under Linux and SVR4
|
||||||
|
|
||||||
V0.8 (release 0.8-1) - 30.Jan.2000
|
V0.8 (release 0.8-1) - 30.Jan.2000
|
||||||
- extfs: extended size of finf helper files to 32 bytes to eventually
|
- extfs: extended size of finf helper files to 32 bytes to eventually
|
||||||
|
@ -25,9 +25,9 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
#include <sys/mount.h>
|
||||||
#include <linux/cdrom.h>
|
#include <linux/cdrom.h>
|
||||||
#include <linux/fd.h>
|
#include <linux/fd.h>
|
||||||
#include <linux/fs.h>
|
|
||||||
#include <linux/major.h>
|
#include <linux/major.h>
|
||||||
#include <linux/kdev_t.h>
|
#include <linux/kdev_t.h>
|
||||||
#include <linux/unistd.h>
|
#include <linux/unistd.h>
|
||||||
|
@ -54,10 +54,7 @@ uint32 TimerDateTime(void)
|
|||||||
{
|
{
|
||||||
time_t utc_now = time(NULL);
|
time_t utc_now = time(NULL);
|
||||||
#if defined(__linux__) || defined(__SVR4)
|
#if defined(__linux__) || defined(__SVR4)
|
||||||
long tz = timezone;
|
time_t local_now = utc_now - timezone;
|
||||||
time_t local_now = utc_now - tz;
|
|
||||||
if (daylight)
|
|
||||||
local_now += 3600;
|
|
||||||
#elif defined(__FreeBSD__) || defined(__NetBSD__)
|
#elif defined(__FreeBSD__) || defined(__NetBSD__)
|
||||||
time_t local_now = utc_now + localtime(&utc_now)->tm_gmtoff;
|
time_t local_now = utc_now + localtime(&utc_now)->tm_gmtoff;
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user