[Boost_users][date_time] Updating ptime after it's been constructed
Hi, Currently I'm creating a boost date_time object as follows: boost::shared_ptrboost::posix_time::ptime time(new boost::posix_time::ptime(boost::posix_time::microsec_clock::local_time())); Now that the ptime object has been created how do I update the boost pointer with a new local_time? There doesn't seem to be any function calls or operators that allow the setting of time. The only operators seem to allow you to offset the time not replace it. Ryan
You can assign a new ptime:
ptime p = microsec_clock::local_time();
//.... some code
p = microsec_clock::local_time();
Or, if you use any ptr to ptime:
*p = ....;
2008/9/10 Ryan McConnehey
Hi,
Currently I'm creating a boost date_time object as follows:
boost::shared_ptrboost::posix_time::ptime time(new boost::posix_time::ptime(boost::posix_time::microsec_clock::local_time()));
Now that the ptime object has been created how do I update the boost pointer with a new local_time? There doesn't seem to be any function calls or operators that allow the setting of time. The only operators seem to allow you to offset the time not replace it.
Ryan _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Igor R
-
Ryan McConnehey