>Mark Brown wrote: > >In my experience, the time_get facet isn't always able to >reliably parse international times and cannot parse every time >string produced by the time_put facet.
Yes, I see two different problems here. You can generate output with time_put<>::put for which there is no matching time_get<> method for parsing that data. What I mean is that you can easily format "%S %p" onto the stream, but there is no method in the time_get<> facet for reading that formatted data back. The stdcxx implemention provides an extension that allows you to do this, but it's an extension. The other problem is the one that I'm more concerned about. >I don't remember ever >having problems with spaces though. Yeah, that is the problem. It is my interpretation that this is a requirement, but I'm not sure that anyone agrees with me on this. I don't really see the point in defining a system for input/output of times and dates if you can't read in the values that you write out. >On Linux at least, stdcxx >has no problems skipping leading space in time strings. That is inconsistent with what I'm seeing. [see partial failure lists below] >Which >locale and what operating system does it not do so for you? > Well, so far I've only tried linux/gcc and win32/vc8 both with their native Standard C++ Library implementations and with the stdcxx implementations. I get failures in each of them with various locales. I attached my testcase to another post in this thread [http://tinyurl.com/2qp7py]. Here is a spew including a few failing locales for each configuration... win32/vc8/stdcxx string= 7.06.1908 locale=Croatian string= 7.06.1908 locale=Czech string= 7/06/1908 locale=Dutch_Belgium string= 7.06.1908 locale=Estonian string= 7.06.1908 locale=Finnish string= 7/06/1908 locale=Greek string= 7.06.1908 locale=Icelandic string= 7. 06. 1908 locale=Slovak string= 7.06.1908 locale=Slovenian string=06/ 7/1908 locale=Swahili string= 7-06-1908 locale=Dutch_Netherlands string= 7/06/1908 locale=English_Australia string=06/ 7/1908 locale=English_Zimbabwe string= 7/06/1908 locale=French_Belgium string= 7/06/1908 locale=Portuguese_Brazil string= 7.06.1908 locale=Swedish_Finland string=03:02:01 locale=Afrikaans win32/vc8/dinkum string=1908/06/07 locale=Afrikaans string=1908-06-07 locale=Albanian string=07.06.1908 locale=Belarusian string=07.6.1908 π. locale=Bulgarian string=7.6.1908 locale=Croatian string=7.6.1908 locale=Czech string=07-06-1908 locale=Danish string=7.06.1908 locale=Estonian string=7.6.1908 locale=Finnish string=1908. 06. 07. locale=Hungarian string=7.6.1908 locale=Icelandic string=1908.06.07. locale=Latvian string=1908.06.07 locale=Lithuanian string=07.06.1908 locale=Norwegian string=1908-06-07 locale=Polish string=07.06.1908 locale=Romanian string=07.06.1908 locale=Russian string=7. 6. 1908 locale=Slovak string=7.6.1908 locale=Slovenian string=1908-06-07 locale=Swedish string=07.06.1908 locale=Tatar string=07.06.1908 locale=Turkish string=07.06.1908 locale=Ukrainian string=7-6-1908 locale=Dutch_Netherlands string=1908-06-07 locale=French_Canada string=07.06.1908 locale=French_Switzerland string=07.06.1908 locale=German_Austria string=07.06.1908 locale=German_Germany string=07.06.1908 locale=German_Liechtenstein string=07.06.1908 locale=German_Luxembourg string=07.06.1908 locale=German_Switzerland string=07.06.1908 locale=Italian_Switzerland string=07-06-1908 locale=Portuguese_Portugal string=07-06-1908 locale=Spanish_Chile string=7.6.1908 locale=Swedish_Finland string=3.02.01 locale=Italian_Italy linux/gcc3463/stdcxx string=07/06/08 locale=thai string= 7.06.1908 locale=bg_BG string=07/06/08 locale=lo_LA string=07/06/08 locale=th_TH string= 3:02:01 locale=aa_DJ string= 3:02:01 locale=aa_ER string= 3:02:01 locale=aa_ET string= 3:02:01 locale=am_ET string= 3,02,01 locale=bg_BG string= 3:02:01 locale=om_ET string= 3:02:01 locale=om_KE string= 3:02:01 locale=so_DJ string= 3:02:01 locale=so_ET string= 3:02:01 locale=so_KE string= 3:02:01 locale=so_SO string= 3:02:01 locale=ti_ER string= 3:02:01 locale=ti_ET linux/gcc3463/gnustdlib string= 3:02:01 locale=aa_DJ string= 3:02:01 locale=aa_ER string= 3:02:01 locale=aa_ET string= 3:02:01 locale=am_ET string= 3,02,01 locale=bg_BG string= 3:02:01 locale=om_ET string= 3:02:01 locale=om_KE string= 3:02:01 locale=so_DJ string= 3:02:01 locale=so_ET string= 3:02:01 locale=so_KE string= 3:02:01 locale=so_SO string= 3:02:01 locale=ti_ER string= 3:02:01 locale=ti_ET string=03:02:01 AM locale=tl_PH >-- Mark >