From 26c47962ef585732d876963559b520cc14c9536f Mon Sep 17 00:00:00 2001 From: bigbiff bigbiff Date: Sat, 6 Sep 2014 18:28:46 -0400 Subject: mktime_tz is blocking, don't use it Change-Id: I0a66a69b68d975389302ae4361c9c106eb722538 --- mtp/MtpUtils.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mtp/MtpUtils.cpp b/mtp/MtpUtils.cpp index 5fa32f271..5be86389a 100755 --- a/mtp/MtpUtils.cpp +++ b/mtp/MtpUtils.cpp @@ -21,6 +21,7 @@ #include #include "MtpUtils.h" +#include "MtpDebug.h" /* @@ -58,10 +59,14 @@ bool parseDateTime(const char* dateTime, time_t& outSeconds) { tm.tm_year = year - 1900; tm.tm_wday = 0; tm.tm_isdst = -1; - if (useUTC) - outSeconds = mktime(&tm); - else + //if (useUTC) { + outSeconds = mktime(&tm); + //} + /* mktime_tz is blocking :P + else { outSeconds = mktime_tz(&tm, tm.tm_zone); + } + */ return true; } -- cgit v1.2.3