
On 09/11/12 14:38, Artyom Beilis wrote: []
First you can create boost::locale::calendar using TZ name
http://www.boost.org/doc/libs/1_52_0/libs/locale/doc/html/classboost_1_1loca...
Than you create a date_time object using calendar and than setup all parameters you need.
http://www.boost.org/doc/libs/1_52_0/libs/locale/doc/html/classboost_1_1loca...
It should be something like using namespace boost::locale::period; boost::locale::date_time dt( year(2012) + month(10) + day(9) + hour(10) + minute(19) + second(0), boost::locale::calendar("Europe/Paris"));
Than you can get a POSIX time from it dt.time(), print it to stream with UTC time zone or create other date_time object like
boost::locale::date_time dt_utc(dt.time(),boost::locale::calendar("UTC"));
And fetch its parameters.
I hadn't tested the chunk of code above but this is a general direction.
Thanks again Artyom, this is exactly what I was looking for. -- Maxim