Summary: | strptime(): %b always returns month 0 | ||
---|---|---|---|
Product: | Base System | Reporter: | Ian Chard <ian> |
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
Status: | Closed Works As Intended | ||
Severity: | Affects Only Me | CC: | emaste, fdupont, grahamperrin, yuripv |
Priority: | --- | ||
Version: | CURRENT | ||
Hardware: | Any | ||
OS: | Any |
Description
Ian Chard
2020-12-17 11:47:34 UTC
That's because you are using '%j' (day of the year) instead of '%d' (day of the month), and it overrides month specification as it comes earlier. (In reply to Yuri Pankov from comment #1) Actually, "as it comes earlier" part is not correct; it seems to be implementation choice as standard does not specify was happens if conflicting specifiers are provided: - if %b and %j are specified, value converted by %b is ignored, month comes from %j - if %d and %j are specified, month day comes from %d, month comes from %j - if all of the %b, %d, and %j are specified, %j is ignored, values come from %b and %d *** Bug 244906 has been marked as a duplicate of this bug. *** Closing as "not a bug", please reopen with more information if you think otherwise. |