Imported Upstream version 1.38
[platform/upstream/connman.git] / tools / stats-tool.c
index 5695048..105dc49 100644 (file)
@@ -108,12 +108,10 @@ static char *option_last_file_name = NULL;
 static bool parse_start_ts(const char *key, const char *value,
                                        gpointer user_data, GError **error)
 {
-       GTimeVal time_val;
+       struct tm tm;
 
-       if (!g_time_val_from_iso8601(value, &time_val))
-               return false;
-
-       option_start_ts = time_val.tv_sec;
+       strptime(value, "%FT%TZ", &tm);
+       option_start_ts = mktime(&tm);
 
        return true;
 }