Re: [Cppcms-users] booster::locale::as::ftime(...) sometimes causes wrong result
Brought to you by:
artyom-beilis
|
From: Petr J. <ele...@ex...> - 2013-06-25 01:18:02
|
Done. https://sourceforge.net/p/cppcms/bugs/98/ Also please note that this bug report and the attached patch https://sourceforge.net/p/cppcms/bugs/97/ Accidentally posted it as anonymous. On 25/06/2013 5:17 AM, Artyom Beilis wrote: > Hi, can you please open a ticket. I'll look into it? > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > > > ----- Original Message ----- >> From: "ele...@ex..." <ele...@ex...> >> To: cpp...@li... >> Cc: >> Sent: Monday, June 17, 2013 12:47 PM >> Subject: Re: [Cppcms-users] booster::locale::as::ftime(...) sometimes causes > wrong result >> >> Simple test: >> >> #include <booster/locale.h> >> #include <iostream> >> #include <sstream> >> >> using namespace booster::locale; >> using namespace std; >> >> int main() >> { >> generator gen; >> std::locale::global(gen("")); >> std::cout.imbue(std::locale()); >> >> string str1="2010-08-10"; >> string str2="10-08-2010"; >> >> istringstream is(str1); >> date_time dt; >> >> is >> as::ftime("%Y-%m-%d") >> dt; >> cout << as::date << dt << endl; >> >> istringstream is2(str2); >> date_time dt2; >> >> is2 >> as::ftime("%d-%m-%Y") >> dt2; >> cout << as::date << dt2 << endl; >> } >> >> Prints: >> >> [petr@petr-archlinux ~]$ ./a.out >> 10/08/2010 >> 20/12/2009 >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Windows: >> >> Build for Windows Store. >> >> http://p.sf.net/sfu/windows-dev2dev >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > -- Please use PGP to encrypt your email to ensure our privacy is respected. |