1) For already non-standard %z extension implement GNU compatible formats:
+hh and -hh. 2) Check for incorrect values for %z. MFC after: 7 days
This commit is contained in:
parent
05761ebcf1
commit
5fca7e1f13
@ -582,10 +582,16 @@ _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
|
||||
i *= 10;
|
||||
i += *buf - '0';
|
||||
buf++;
|
||||
} else if (len == 2) {
|
||||
i *= 100;
|
||||
break;
|
||||
} else
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if (i > 1400 || (sign == -1 && i > 1200) ||
|
||||
(i % 100) >= 60)
|
||||
return (NULL);
|
||||
tm->tm_hour -= sign * (i / 100);
|
||||
tm->tm_min -= sign * (i % 100);
|
||||
*GMTp = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user