aboutsummaryrefslogtreecommitdiff
path: root/time/strptime_l.c
diff options
context:
space:
mode:
Diffstat (limited to 'time/strptime_l.c')
-rw-r--r--time/strptime_l.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/time/strptime_l.c b/time/strptime_l.c
index 4203ad81a0..989edd6144 100644
--- a/time/strptime_l.c
+++ b/time/strptime_l.c
@@ -749,13 +749,19 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM)
rp++;
break;
case 'z':
- /* We recognize two formats: if two digits are given, these
+ /* We recognize three formats: if two digits are given, these
specify hours. If fours digits are used, minutes are
- also specified. */
+ also specified. 'Z' is equivalent to +0000. */
{
val = 0;
while (ISSPACE (*rp))
++rp;
+ if (*rp == 'Z')
+ {
+ ++rp;
+ tm->tm_gmtoff = 0;
+ break;
+ }
if (*rp != '+' && *rp != '-')
return NULL;
bool neg = *rp++ == '-';