|
Boost Users : |
From: Scott (cheesy4poofs_at_[hidden])
Date: 2006-05-04 08:17:33
I noticed there's a from_time_t() helper function, but I need to convert
from a ptime to a time_t. Is this the proper way to do it?
inline
std::time_t to_time_t(ptime t)
{
ptime start(gregorian::date(1970,1,1));
time_duration dur = t - start;
return dur.seconds();
}
I'm also curious why such functionality isn't already available?
Scott
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net