From 937879634d1029759f6d18856ec7ceb213547ef0 Mon Sep 17 00:00:00 2001 From: Hojong Han Date: Mon, 26 Aug 2013 20:15:28 +0900 Subject: [PATCH] Sync timezone before getting local time [Title] Sync timezone before getting local time [Issue#] N_SE-49766 [Problem] Analogue clock should indicate the right time after changing timezone [Cause] Changed timezone was not updated [Solution] Routine added to update timezone Change-Id: Ifcd442abfafeeee899ee8fd10e094e556ca86f18 --- Source/WTF/wtf/DateMath.cpp | 4 ++++ Source/WTF/wtf/Platform.h | 1 + 2 files changed, 5 insertions(+) diff --git a/Source/WTF/wtf/DateMath.cpp b/Source/WTF/wtf/DateMath.cpp index b964261..360028c 100644 --- a/Source/WTF/wtf/DateMath.cpp +++ b/Source/WTF/wtf/DateMath.cpp @@ -451,6 +451,10 @@ LocalTimeOffset calculateLocalTimeOffset(double ms) // FIXME: time_t has a potential problem in 2038 time_t localTime = static_cast(localTimeSeconds); +#if ENABLE(TIZEN_UPDATE_TIMEZONE_INFO) + tzset(); +#endif + #if HAVE(TM_GMTOFF) tm localTM; getLocalTime(&localTime, &localTM); diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h index d45c90e..0d81dd4 100755 --- a/Source/WTF/wtf/Platform.h +++ b/Source/WTF/wtf/Platform.h @@ -783,6 +783,7 @@ com) : Patch to do not adjust cover rect as fixed pixel size*/ #define ENABLE_TIZEN_SET_PROPERTY_ATTRIBUTE_CORRECTLY 1 /* Hojong Han(hojong.han@samsung.com) : Fix overwritting Read-only property, set from WRT */ #define ENABLE_TIZEN_JSC_SKIP_PROPERTY_TABLE_ERROR 1 /* Hojong Han(hojong.han@samsung.com) : Skip property table error */ #define ENABLE_TIZEN_GENERATE_COMBINED_UTC_LOCAL 1 /* Hojong Han(hojong.han@samsung.com) : Simplify date handling code */ +#define ENABLE_TIZEN_UPDATE_TIMEZONE_INFO 1 /* Hojong Han(hojong.han@samsung.com) : Sync timezone before getting local time */ #define ENABLE_TIZEN_WRT_LAUNCHING_PERFORMANCE 1 /* Byungwoo Lee(bw80.lee@samsung.com) : Local patches to enhance web app launching performance */ -- 2.7.4