Boost logo

Boost Users :

Subject: Re: [Boost-users] 32 bit time stamp to date and time
From: Igor R (boost.lists_at_[hidden])
Date: 2010-10-24 09:05:15


> Sorry, I did not understand. My doubt is
>
> if the 32bit input value is 70 (70 seconds since 1900), the output would be
> 1900-01-01, 00:01:10., and the day of week is Monday
>
> By using the function "from_time_t " can we get this output?

time_t is number of seconds since 1/11970
If your input is the number of seconds since 1/1/1900, then before
using from_time_t() you have to add the number of seconds between
1/1/1900 and 1/1/1970.
IIRC, it's (70 * 365 + 17) * 86400


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