mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
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:
parent
cefa66eb76
commit
fdccf5ff34
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user