Use localtime_r for thread safe instead localtime 25/70025/1 accepted/tizen/common/20160518.124940 accepted/tizen/ivi/20160518.090332 accepted/tizen/mobile/20160518.090306 accepted/tizen/tv/20160518.090320 accepted/tizen/wearable/20160518.090303 submit/tizen/20160518.014554
authorsangwan.kwon <sangwan.kwon@samsung.com>
Wed, 18 May 2016 01:22:42 +0000 (10:22 +0900)
committersangwan.kwon <sangwan.kwon@samsung.com>
Wed, 18 May 2016 01:22:42 +0000 (10:22 +0900)
Change-Id: Ia962124e228479a6f27cecda6c778cb660cf750c

vcore/vcore/TimeConversion.cpp

index 65f7d07..fd04664 100644 (file)
@@ -296,7 +296,10 @@ int asn1TimeToTimeT(ASN1_TIME *t, time_t *res)
         *res = TIME_MAX;
     }
 
-    LogDebug("Result time_t(tm format): " << asctime_r(localtime(res), buf));
+    // For Debugging.
+    struct tm localTm;
+    localtime_r(res, &localTm);
+    LogDebug("Result time_t(tm format): " << asctime_r(&localTm, buf));
 
     return 1;
 }