mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-28 23:16:14 +01:00
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
This commit is contained in:
parent
bc78f0ad27
commit
325d17c49f
@ -286,7 +286,7 @@ g_time_zone_ref (GTimeZone *tz)
|
|||||||
/* fake zoneinfo creation (for RFC3339/ISO 8601 timezones) {{{1 */
|
/* fake zoneinfo creation (for RFC3339/ISO 8601 timezones) {{{1 */
|
||||||
/*
|
/*
|
||||||
* parses strings of the form h or hh[[:]mm[[[:]ss]]] where:
|
* 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
|
* - mm is 00 to 59
|
||||||
* - ss is 00 to 59
|
* - ss is 00 to 59
|
||||||
*/
|
*/
|
||||||
@ -310,7 +310,7 @@ parse_time (const gchar *time_,
|
|||||||
*offset *= 10;
|
*offset *= 10;
|
||||||
*offset += 60 * 60 * (*time_++ - '0');
|
*offset += 60 * 60 * (*time_++ - '0');
|
||||||
|
|
||||||
if (*offset > 23 * 60 * 60)
|
if (*offset > 24 * 60 * 60)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (*time_ == '\0')
|
if (*time_ == '\0')
|
||||||
@ -1156,7 +1156,7 @@ init_zone_from_rules (GTimeZone *gtz,
|
|||||||
* - N is 0 to 365
|
* - N is 0 to 365
|
||||||
*
|
*
|
||||||
* time is either h or hh[[:]mm[[[:]ss]]]
|
* 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
|
* - mm is 00 to 59
|
||||||
* - ss is 00 to 59
|
* - ss is 00 to 59
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user