28 May
2005
28 May
'05
12:10 a.m.
I'm not sure if this is a bug or if I'm misusing the library. It seems that serializing boost::posix_time_ptime fails when using non-standard locale (Windows Xp OS - vc 7.1 compiler - boost updated from CVS few days ago). As an example, try adding std::locale::global( std::locale( "en" ) ); as the first line of the testtime_serialize.cpp; this causes the test to fail when doing ia >> pt2; I tried to understand what was happening, and it seems to me that the problem is in keeping into account locale when serializing, while ignoring it while unserializing. In greg_serialize.hpp to_iso_string(d) may generate something like "2,0050527"; the method from_undelimited_string(ds) used to load the serialized date, expects a 4,2,2 format. Paolo