8 Jan
2005
8 Jan
'05
4:05 a.m.
On Fri, 07 Jan 2005 22:44:13 -0500, Stephen torri wrote
I need an example of taking a time duration in seconds and converting it to a date using Boost::Date_Time. For example,
805168227 seconds (time from December 31st, 1969, at 4:00 P.M.)
= approx. 25 years, 194 days, 1 hr, 50 minutes, 27 seconds
= File created on 1994 June 15 5:50:27
(Conversion did not account for leap years).
I'm not quite sure what you are asking. You have seconds since a known epoch and you want to create a date from that? It would be something like: ptime epoch(date(1969, Dec, 31), hours(16)); //4 pm on dec 31 1969 seconds s(...); //whatever //what? Or is seconds since creation that you have and what to backtrack to the date? Jeff