I am living in the Netherlands, when I run this code:
boost::local_time::local_date_time t = boost::local_time::local_sec_clock::local_time(boost::local_time::time_zone_ptr());
std::cout << "\nDate Time: " << t.to_string() ;
The “Date Time” returned is one hour behind. It is UTC but it should be GMT+1 or UTC+1 for my current system date time!
What should I change to the boost::local_time to get the system date time.
Thanks in advance.
boost::local_time::time_zone_ptr zone_GMT1(new boost::local_time::posix_time_zone(“GMT+1”));
boost::local_time::local_date_time t =
boost::local_time::local_sec_clock::local_time(zone_GMT1);
I found out to use the timeZone.
It works fine for me
Thanks!