From: Hokwon Song Date: Mon, 3 Jun 2013 10:07:59 +0000 (+0900) Subject: Fix the prevent issue X-Git-Tag: submit/tizen_2.2/20130714.152805~143 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c199a69d2b9ef006f2c630da091ccc7abf69e189;p=framework%2Fosp%2Fappfw.git Fix the prevent issue Change-Id: Ifc070da91a084a8559d6adae9a97bb1c44c0cacc Signed-off-by: Hokwon Song --- diff --git a/src/locales/FLcl_LocaleManagerImpl.cpp b/src/locales/FLcl_LocaleManagerImpl.cpp index e1b7b1b..3dab222 100644 --- a/src/locales/FLcl_LocaleManagerImpl.cpp +++ b/src/locales/FLcl_LocaleManagerImpl.cpp @@ -384,7 +384,7 @@ TimeZone _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; @@ -392,7 +392,10 @@ _LocaleManagerImpl::GetSystemTimeZone(void) 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);