From 8a1d6753bcef62a5de68a217436a52599246c411 Mon Sep 17 00:00:00 2001 From: Denis Bernard Date: Mon, 27 Jun 2011 21:23:06 +0200 Subject: [PATCH] Fixed timezone issue Timezone offset was not working. --- jni/Android.mk | 2 +- jni/timer.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jni/Android.mk b/jni/Android.mk index 1241292..84229bc 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -30,7 +30,7 @@ LOCAL_MODULE := droid48 LOCAL_LDLIBS := -L${SYSROOT}/usr/lib -llog -LOCAL_SRC_FILES := config.h actions.c binio.c debugger.c device.c \ +LOCAL_SRC_FILES := actions.c binio.c debugger.c device.c \ disasm.c emulate.c init.c \ lcd.c main.c memory.c options.c register.c \ resources.c romio.c rpl.c serial.c timer.c x48.c diff --git a/jni/timer.c b/jni/timer.c index 8958a38..23cef3a 100644 --- a/jni/timer.c +++ b/jni/timer.c @@ -210,9 +210,9 @@ set_accesstime() (void)time(&gmt); ltm = localtime(&gmt); #ifdef SYSV_TIME - if( ltm->tm_isdst ) + systime_offset += timezone; + if( ltm->tm_isdst > 0 ) systime_offset = -3600; - //systime_offset += timezone; #else systime_offset = -ltm->tm_gmtoff; #endif