- Unix: changed time zone handling (again)

This commit is contained in:
cebix 2000-02-21 20:04:18 +00:00
parent e7c9a80182
commit 1efa7490cf
3 changed files with 3 additions and 5 deletions

View File

@ -1,5 +1,6 @@
V0.8 -
- 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
- extfs: extended size of finf helper files to 32 bytes to eventually

View File

@ -25,9 +25,9 @@
#include <errno.h>
#ifdef __linux__
#include <sys/mount.h>
#include <linux/cdrom.h>
#include <linux/fd.h>
#include <linux/fs.h>
#include <linux/major.h>
#include <linux/kdev_t.h>
#include <linux/unistd.h>

View File

@ -54,10 +54,7 @@ uint32 TimerDateTime(void)
{
time_t utc_now = time(NULL);
#if defined(__linux__) || defined(__SVR4)
long tz = timezone;
time_t local_now = utc_now - tz;
if (daylight)
local_now += 3600;
time_t local_now = utc_now - timezone;
#elif defined(__FreeBSD__) || defined(__NetBSD__)
time_t local_now = utc_now + localtime(&utc_now)->tm_gmtoff;
#else