
21 Oct
2009
21 Oct
'09
10:03 a.m.
I'm particularly interested in efficient binary serialization of date_time types and/or conversion to integer(s).
I also can't see any access to the internal value, so what you can do instead is to make some time_duration, and use it instead of the absolute ptime. Like this: pt::ptime epoch(greg::date(1970, 1, 1)); // or some other reference point pt::time_duration duration = t - epoch; boost::int64_t diff = duration.total_seconds(); // or total_microseconds() or ticks() Similarly, you can reconstruct the ptime later.