8 Jan
2005
8 Jan
'05
5:07 p.m.
On Sat, 08 Jan 2005 04:37:27 -0500, Stephen torri wrote
I apologize for the confusion. I have two fact: time of creation and the epoch. The time of creation is given as the number of seconds that have elapsed since the epoch. The value I read from a file header is in seconds. So I want to do:
Epoch + seconds = date & time.
Something like:
ptime epoch(date(1969,Dec,31), hours(16)); seconds s_time (805168227);
ptime creation_date = epoch + s_time;
std::cout << "File created: " << creation_date.toString();
So all you should need to do is change the output line: //output the date plus the time std::cout << "File created: " << creation_date; or //output just the date part. std::cout << "File created: " << creation_date.date(); HTH, Jeff