[glib: 3/8] gtimezone: allow hh to be 24, as per POSIX
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 3/8] gtimezone: allow hh to be 24, as per POSIX
- Date: Fri, 17 Jul 2020 13:55:04 +0000 (UTC)
commit 325d17c49faa635730f815d10860d843dc9796f9
Author: Paul Eggert <eggert cs ucla edu>
Date: Thu Jul 16 12:41:49 2020 -0700
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
glib/gtimezone.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/glib/gtimezone.c b/glib/gtimezone.c
index 296af3dd01..be13319996 100644
--- a/glib/gtimezone.c
+++ b/glib/gtimezone.c
@@ -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
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]