[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: T.strptime{3}



As promised here is further information...

On Oct 26,  1:07pm in "T.strptime{3}", Rajit Sarkar wrote:
> >From reading man strptime, it would appear that this testcase has 5 errors.
> One of these is due to the ambiguous specification of strptime.
> The field descriptor "%I" allows hours to be printed in the range of 0 -
> 12.
> So in the case of the LSB-os test suite, the hour 12 could be printed as
> either 0 or 12, and not be wrong in either case.

As before %I runs [1,12] as per ISO C and the Single UNIX Specification
>
> The remaining errors would then be problems with the test suite.
> Two of these are due to the test attempting to use "an alternative
> locale-dependent format" for the numerical input, without specifying the
> "O" modifier.
>
> "%U"
> "%W"
>
> These should probably be "%OE" and "%OW"

No, there are no tests for the O modifier included in the testset. These are
definitely meant to be for %E and %W, so there must be another
problem.

>
> "00"
>
> This is not a valid weekday, and should be replaced with "0"
>
> "0091"
>
> A year with the century specified requires the field descriptor "%Y"
> Rather than the "%y" that was used in the testcase

The extra zeros are there in order to test the statement in the
spec, "leading zeros are permitted but not required."  Failures
related to the leading zeros were treated as a grey area for XPG4
(PIN4.055), but there has been no equivalent PIN issued for
UNIX98.

regards
Andrew



Reply to: