https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=137307

--- Comment #2 from Pedro F. Giffuni <p...@freebsd.org> ---
(In reply to Pedro F. Giffuni from comment #1)
...
> I haven't tested it yet but I will.
> 

Running test from:
http://www.scs.stanford.edu/histar/src/pkg/uclibc/test/time/tst-strptime.c

Results before the patch:
...
strptime ("2001 20 Mon", "%Y %U %a", ...)
        should be: wday = 1, yday = 140, mon =  4, mday = 21
               is: wday = 1, yday =   0, mon =  0, mday =  0
yearday for `2001 20 Mon' incorrect: 0 instead of 140
month for `2001 20 Mon' incorrect: 0 instead of 4
monthday for `2001 20 Mon' incorrect: 0 instead of 21
strptime ("2001 21 Mon", "%Y %W %a", ...)
        should be: wday = 1, yday = 140, mon =  4, mday = 21
               is: wday = 1, yday =   0, mon =  0, mday =  0
yearday for `2001 21 Mon' incorrect: 0 instead of 140
month for `2001 21 Mon' incorrect: 0 instead of 4
monthday for `2001 21 Mon' incorrect: 0 instead of 21


Results after the patch:
...
strptime ("2001 20 Mon", "%Y %U %a", ...)
        should be: wday = 1, yday = 140, mon =  4, mday = 21
               is: wday = 1, yday = 139, mon =  4, mday = 20
yearday for `2001 20 Mon' incorrect: 139 instead of 140
monthday for `2001 20 Mon' incorrect: 20 instead of 21
strptime ("2001 21 Mon", "%Y %W %a", ...)
        should be: wday = 1, yday = 140, mon =  4, mday = 21
               is: wday = 1, yday = 140, mon =  4, mday = 21
___

So there may be a technical mismatch (GNU libc manages to reinterpret standards
in amusing ways) for the %U case but the result is clearly a gain.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to