Re: [Cppcms-users] strange date time parsing
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2012-07-12 08:17:04
|
See, time parsing is done by ICU library. If it fails to parse such a date, it seems to be ICU limitation. Also make sure that correct locale installed into std::istringstream is; (If it is set globally should not be a problem) Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: "ele...@ex..." <ele...@ex...> >To: Lee Elenbaas <lee...@gm...> >Cc: cpp...@li... >Sent: Monday, July 9, 2012 10:35 AM >Subject: Re: [Cppcms-users] strange date time parsing > >> it seems the the format of the date and for the parsing do not match in >> the >> second example >> > >Sorry that was just a typo. > >see, I fixed it below > >> it seems like that if i move %Y and the year to start like this: >> >> std::istringstream is("2012_01_01-05_30_45"); >> booster::locale::date_time dt; >> is >> booster::locale::as::ftime("%Y_%d_%m-%H_%M_%S") >> dt; > > >The problem is still the same. It seems like the time gets parsed properly >everytime but the date does not unless the date is in the format %Y_%d_%m >or %Y_%m-%d > >Petr > > >------------------------------------------------------------------------------ >Live Security Virtual Conference >Exclusive live event will cover all the ways today's security and >threat landscape has changed and how IT managers can respond. Discussions >will include endpoint security, mobile security and the latest in malware >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |