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 @@ label:
|
|||||||
i *= 10;
|
i *= 10;
|
||||||
i += *buf - '0';
|
i += *buf - '0';
|
||||||
buf++;
|
buf++;
|
||||||
|
} else if (len == 2) {
|
||||||
|
i *= 100;
|
||||||
|
break;
|
||||||
} else
|
} else
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (i > 1400 || (sign == -1 && i > 1200) ||
|
||||||
|
(i % 100) >= 60)
|
||||||
|
return (NULL);
|
||||||
tm->tm_hour -= sign * (i / 100);
|
tm->tm_hour -= sign * (i / 100);
|
||||||
tm->tm_min -= sign * (i % 100);
|
tm->tm_min -= sign * (i % 100);
|
||||||
*GMTp = 1;
|
*GMTp = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user