Opened 12 years ago
#4722 new Bugs
Locale problem in date_input_facet
Reported by: | Owned by: | az_sw_dude | |
---|---|---|---|
Milestone: | To Be Determined | Component: | date_time |
Version: | Boost 1.43.0 | Severity: | Problem |
Keywords: | date input facet | Cc: |
Description
I was adapting my code to work inputs from strings and outputs for strings with the local_datetime class for different languages, and came across a problem in local_time_input_facet. Even when I change the global locale the code was just accepting the strings in English. Analyzing the code of the class I realized that the parent class date_input_facet always defined the internal parser to locale:: classic () (date_facet.hpp line 451 and 462 m_parser(m_format, std::locale::classic())). I changed the definition for std::locale() and the program now work correctly (m_parser(m_format, std::locale())). This is a bug, or is there any reason to be this way? I am developing on Windows XP with Visual Studio Express 10.