diff --git a/src/manage_sql.c b/src/manage_sql.c index 5fbcea45..1d247f23 100644 --- a/src/manage_sql.c +++ b/src/manage_sql.c @@ -888,23 +888,23 @@ parse_iso_time (const char *text_time) memset (&tm, 0, sizeof (struct tm)); tm.tm_isdst = -1; - if (strptime ((char*) text_time, "%FT%T%z", &tm) == NULL) + if (strptime ((char*) text_time, "%Y-%m-%dT%T%z", &tm) == NULL) { gchar *tz; memset (&tm, 0, sizeof (struct tm)); tm.tm_isdst = -1; - if (strptime ((char*) text_time, "%FT%TZ", &tm) == NULL) + if (strptime ((char*) text_time, "%Y-%m-%dT%TZ", &tm) == NULL) { /* Try time without timezone suffix, applying timezone of user. */ memset (&tm, 0, sizeof (struct tm)); tm.tm_isdst = -1; - if (strptime ((char*) text_time, "%FT%T", &tm) == NULL) + if (strptime ((char*) text_time, "%Y-%m-%dT%T", &tm) == NULL) { memset (&tm, 0, sizeof (struct tm)); tm.tm_isdst = -1; - if (strptime ((char*) text_time, "%F %T", &tm) == NULL) + if (strptime ((char*) text_time, "%Y-%m-%d %T", &tm) == NULL) return parse_ctime (text_time); } @@ -928,11 +928,11 @@ parse_iso_time (const char *text_time) memset (&tm, 0, sizeof (struct tm)); tm.tm_isdst = -1; - if (strptime ((char*) text_time, "%FT%T", &tm) == NULL) + if (strptime ((char*) text_time, "%Y-%m-%dT%T", &tm) == NULL) { memset (&tm, 0, sizeof (struct tm)); tm.tm_isdst = -1; - if (strptime ((char*) text_time, "%F %T", &tm) == NULL) + if (strptime ((char*) text_time, "%Y-%m-%d %T", &tm) == NULL) { assert (0); g_warning ("%s: Failed to parse time", __FUNCTION__); @@ -961,7 +961,7 @@ parse_iso_time (const char *text_time) memset (&tm, 0, sizeof (struct tm)); tm.tm_isdst = -1; - if (strptime ((char*) text_time, "%FT%TZ", &tm) == NULL) + if (strptime ((char*) text_time, "%Y-%m-%dT%TZ", &tm) == NULL) { assert (0); g_warning ("%s: Failed to parse time", __FUNCTION__); @@ -1045,7 +1045,7 @@ parse_iso_time (const char *text_time) memset (&tm, 0, sizeof (struct tm)); tm.tm_isdst = -1; - if (strptime ((char*) text_time, "%FT%T%z", &tm) == NULL) + if (strptime ((char*) text_time, "%Y-%m-%dT%T%z", &tm) == NULL) { assert (0); g_warning ("%s: Failed to parse time", __FUNCTION__); @@ -28442,7 +28442,7 @@ host_summary_append (GString *host_summary_buffer, const char *host, struct tm start_tm; memset (&start_tm, 0, sizeof (struct tm)); - if (strptime (start_iso, "%FT%H:%M:%S", &start_tm) == NULL) + if (strptime (start_iso, "%Y-%m-%dT%H:%M:%S", &start_tm) == NULL) { g_warning ("%s: Failed to parse start", __FUNCTION__); return; @@ -28462,7 +28462,7 @@ host_summary_append (GString *host_summary_buffer, const char *host, struct tm end_tm; memset (&end_tm, 0, sizeof (struct tm)); - if (strptime (end_iso, "%FT%H:%M:%S", &end_tm) == NULL) + if (strptime (end_iso, "%Y-%m-%dT%H:%M:%S", &end_tm) == NULL) { g_warning ("%s: Failed to parse end", __FUNCTION__); return;