Apply the dst rule for the system timezone.
authorHokwon Song <hokwon.song@samsung.com>
Thu, 23 May 2013 04:36:41 +0000 (13:36 +0900)
committerHokwon Song <hokwon.song@samsung.com>
Thu, 23 May 2013 04:36:41 +0000 (13:36 +0900)
Change-Id: I2ee54f41d8c10edf8c7a1048c1c60174f71cddd5
Signed-off-by: Hokwon Song <hokwon.song@samsung.com>
src/locales/FLcl_LocaleManagerImpl.cpp

index 4155f28..52c4aa6 100644 (file)
@@ -20,6 +20,7 @@
 */
 #include <unique_ptr.h>
 #include <limits.h>
+#include <time.h>
 #include <runtime_info.h>
 #include <unicode/calendar.h>
 #include <unicode/timezone.h>
@@ -638,8 +639,16 @@ _LocaleManagerImpl::GetSystemTimeZone(void)
 
        String tzId(tz + 20);
        SysLog(NID_LCL, "System TimeZone id [%ls]", tzId.GetPointer());
+
        TimeZone timeZone;
-       result r = Tizen::Locales::TimeZone::GetTimeZone(tzId, timeZone);
+       DateTime utcTime;
+       struct tm* pGmTime = null;
+       time_t currTime = 0;
+       time(&currTime);
+       pGmTime = gmtime(&currTime);
+       utcTime.SetValue(pGmTime->tm_year + 1900, pGmTime->tm_mon + 1, pGmTime->tm_mday, pGmTime->tm_hour, pGmTime->tm_min, pGmTime->tm_sec);
+
+       result r = Tizen::Locales::TimeZone::GetTimeZone(tzId, utcTime, timeZone);
        SysTryReturn(NID_LCL, r == E_SUCCESS, TimeZone(-1, ""), r, "[%s] error occurs.", GetErrorMessage(r));
        return timeZone;
 }