_LocaleManagerImpl::GetSystemTimeZone(void)
{
std::unique_ptr< char, FreeCharPtr> tzId(vconf_get_str(VCONFKEY_SETAPPL_TIMEZONE_ID));
- SysTryReturn(NID_LCL, tzId, TimeZone(-1, ""), E_SYSTEM, "It is failed to get System Time Zone");
+ SysTryReturn(NID_LCL, tzId, TimeZone(-1, ""), E_SYSTEM, "It is failed to get System Time Zone.");
SysLog(NID_LCL, "System TimeZone id [%s]", tzId.get());
TimeZone timeZone;
struct tm* pGmTime = null;
time_t currTime = 0;
time(&currTime);
+ SysTryReturn(NID_LCL, currTime, TimeZone(-1, ""), E_SYSTEM, "It is failed to get system time.");
pGmTime = gmtime(&currTime);
+ SysTryReturn(NID_LCL, pGmTime, TimeZone(-1, ""), E_SYSTEM, "It is failed to convert the time value to UTC time.");
+
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(String(tzId.get()), utcTime, timeZone);