This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Sat, Dec 15, Ulrich Drepper wrote: > Thorsten Kukuk <kukuk@suse.de> writes: > > > strptime("12", "%I", &testbuf) should return tm_hour = 12 > > The range is [1,12], not [0,11]. But we return tm_hour = 0. > > Which is OK. %I alone can be interpreted as 0 hours or 12 hours (12am > or 12pm). And you are confusing input format specification [1,12] > with the allowed values for tm_hour (defined in <time.h>). 12 is allowed for tm_hour. And I don't think that we are allowed to modify correct input into another value, if the output would be also correct. > > The leading zeros are allowed. > > Leading zeros refers to the zeros you can add before the digit for > numbers < 10. This is max. one zero, but the draft explicit writes zeros. Thorsten -- Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de SuSE GmbH Deutschherrenstr. 15-19 D-90429 Nuernberg -------------------------------------------------------------------- Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |