4 May
2006
4 May
'06
12:17 p.m.
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