X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=tools%2Fstats-tool.c;h=105dc4973edb65f4dae58c1a45207bb437bfc015;hb=c647a4b6f1132684c9d8b8ad71ec38d81147b278;hp=efa39de2727490b183a51c2048c49be94c9a8315;hpb=9362752a471a5c892d679548fbf2828d5fc5684b;p=platform%2Fupstream%2Fconnman.git diff --git a/tools/stats-tool.c b/tools/stats-tool.c old mode 100644 new mode 100755 index efa39de..105dc49 --- a/tools/stats-tool.c +++ b/tools/stats-tool.c @@ -22,7 +22,6 @@ #include #endif -#define _GNU_SOURCE #include #include #include @@ -109,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; }