Commit 325d17c4 authored by Paul Eggert's avatar Paul Eggert

gtimezone: allow hh to be 24, as per POSIX

POSIX allows hh to be 24; see
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03
parent bc78f0ad
......@@ -286,7 +286,7 @@ g_time_zone_ref (GTimeZone *tz)
/* fake zoneinfo creation (for RFC3339/ISO 8601 timezones) {{{1 */
/*
* parses strings of the form h or hh[[:]mm[[[:]ss]]] where:
* - h[h] is 0 to 23
* - h[h] is 0 to 24
* - mm is 00 to 59
* - ss is 00 to 59
*/
......@@ -310,7 +310,7 @@ parse_time (const gchar *time_,
*offset *= 10;
*offset += 60 * 60 * (*time_++ - '0');
if (*offset > 23 * 60 * 60)
if (*offset > 24 * 60 * 60)
return FALSE;
if (*time_ == '\0')
......@@ -1156,7 +1156,7 @@ init_zone_from_rules (GTimeZone *gtz,
* - N is 0 to 365
*
* time is either h or hh[[:]mm[[[:]ss]]]
* - h[h] is 0 to 23
* - h[h] is 0 to 24
* - mm is 00 to 59
* - ss is 00 to 59
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment