
On Thu, Nov 8, 2012 at 10:36 AM, Maxim Yegorushkin < maxim.yegorushkin@gmail.com> wrote:
Oh, thanks Artyom.
That is quite a surprising place to find this functionality. Not sure why it is not in datetime library.
Anyway, I managed to get a small test working:
#include <iostream> #include <sstream> #include <boost/locale.hpp>
int main() { boost::locale::generator gen; std::locale::global(gen("en_**GB.UTF-8")); std::cout.imbue(std::locale())**;
boost::locale::date_time d; std::istringstream ss("8 Nov 2012 17:00:00"); ss >> boost::locale::as::time_zone("**America/New_York") >> d;
std::cout << boost::locale::as::time_zone("**UTC") << d << '\n'; // prints 8 Nov 2012 22:00:00 }
Thanks a lot!
-- Maxim
Yes, surprising -- obviously I've been asleep b/c I was completely unaware of this work...seems like we now have a lot of library duplication :-(