*/
#include <unique_ptr.h>
#include <limits.h>
+#include <time.h>
#include <runtime_info.h>
#include <unicode/calendar.h>
#include <unicode/timezone.h>
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;
}