I am using the following code to get the current date time (Mountain time)
const boost::posix_time::ptime now = boost::posix_time::second_clock::local_time();
//In mountain time I get now = 2013-Apr-08 20:44:22
Now I am using the following method for conversion
ptime FeedConnector::MountaintToEasternConversion(ptime coloTime)
{
return boost::date_time::local_adjustor <ptime, -5, us_dst>::utc_to_local(coloTime);
}
//This function is suppose to give me the time in NewYork (East standard time) and I am getting
2013-Apr-08 16:44:22
Thsi time is wrong any suggestion where I am going wrong ?