Re: [Cppcms-users] booster::locale::as ...
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2015-10-07 11:11:38
|
Just to make an order... There is an integer POSIX time - time in seconds since Unix Epoch - it is returned by time(0) and booster::ptime::now() - with higher accuracy - it is the basic. There is a std::tm (http://en.cppreference.com/w/cpp/chrono/c/tm) that can represent local time or UTC time and coverted to/from using booster::ptime::local_time/universal_time from integer representation into values lime tm_year, tm_hour etc.similarly to localtime_r/gmtime_r and timegm/mktime but in cross platform manner, http://cppcms.com/cppcms_ref/latest/classbooster_1_1ptime.html cppdb uses std::tm as date-time representation, alternatively you can also encode date/time as ISO string the way you wish. boost::locale::as::*time* uses time representation is integer/floating point number and formats it according to givenflags - it can use local time, utc time or whatever timezone you like time according to any format you specify it is provided for human interface time formatting - according to your locale i.e. 5/30/2015, 30/5/2015 or 2015年5月30日 Now which time do you need? Artyom Beilis From: mawan sugiyanto <ma...@gm...> To: cpp...@li... Sent: Wednesday, October 7, 2015 1:15 PM Subject: [Cppcms-users] booster::locale::as ... Dear All Can I use booster::locale::as ...... to covert pt time to variable? like string or intenger?Many example use booster::locale::as ... output to the cout or response().out() ...there are no example to covert it to needed variable. Thanks Mawan ------------------------------------------------------------------------------ Full-scale, agent-less Infrastructure Monitoring from a single dashboard Integrate with 40+ ManageEngine ITSM Solutions for complete visibility Physical-Virtual-Cloud Infrastructure monitoring from one console Real user monitoring with APM Insights and performance trend reports Learn More http://pubads.g.doubleclick.net/gampad/clk?id=247754911&iu=/4140 _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |