gtimer: Drop support for negative years from g_time_val_from_iso8601()

It never worked; we’ve always parsed the year with strtoul() (unsigned).
While negative years are supported by the ISO 8601 standard, they can
only be used by mutual agreement of the two parties interchanging data.
Moreover, they are not supported by GTimeVal, which is what we’re
filling with the results.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2018-08-06 13:58:06 +01:00
parent cefa66eb76
commit fdccf5ff34

View File

@ -372,7 +372,7 @@ g_time_val_from_iso8601 (const gchar *iso_date,
if (*iso_date == '\0')
return FALSE;
if (!g_ascii_isdigit (*iso_date) && *iso_date != '-' && *iso_date != '+')
if (!g_ascii_isdigit (*iso_date) && *iso_date != '+')
return FALSE;
val = strtoul (iso_date, (char **)&iso_date, 10);