[
https://issues.apache.org/jira/browse/STDCXX-535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Sebor updated STDCXX-535:
--------------------------------
Severity: Incorrect Behavior
Fix Version/s: 4.3
Assignee: Martin Sebor
Remaining Estimate: 4h
Original Estimate: 4h
Sounds like POSIX doesn't intend for {{strftime()}} to produce output that's
not parseable by {{strptime()}} in this case. We need to file an Aardvark with
POSIX and tweak our code to conform to the intended POSIX behavior.
Scheduled for 4.3.
> std::time_put can generate output that is not parseable by std::time_get facet
> ------------------------------------------------------------------------------
>
> Key: STDCXX-535
> URL: https://issues.apache.org/jira/browse/STDCXX-535
> Project: C++ Standard Library
> Issue Type: Bug
> Components: 22. Localization
> Affects Versions: 4.1.2, 4.1.3, 4.1.4
> Reporter: Travis Vitek
> Assignee: Martin Sebor
> Fix For: 4.3
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> std::time_get<>::get_date() is required to be able to parse the output
> produced by std::time_put<>::put(..., 'x'). For some locales, the '%x' format
> specifier expands out to '%e.%m.%Y'. When a date is formatted using this,
> there will be a leading space, and that leading space causes the
> time_get<>::get_date() operation to fail.
> The root of the problem is that the POSIX strftime() function [which we
> emulate in time_get] requires that the '%e' specifier generate whitespace for
> single digit monthdays, and the POSIX strptime() function says that the
> number may be padded on the left with 0s. It does not appear to specify that
> whitespace is allowed. The strptime() implementation on some platforms [sun,
> linux, compaq, aix] allow this whitespace, while others [hp, freebsd] do not.
> Discussion here.
> [http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-dev/200708.mbox/[EMAIL
> PROTECTED]
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.