Re: Return value of _time64() in VS2005
- From: Tim Roberts <timr@xxxxxxxxx>
- Date: Mon, 02 Jan 2006 16:50:19 -0800
"Heinz Ozwirk" <hozwirk.SPAM@xxxxxxxx> wrote:
>
>The common description of time() and _time64() says that the function
>returns the number of seconds elapsed since midnight of 1970-01-01. If you
>do not call _time64(0) after 2038-01-18, you can use the first or the third
>declaration above. (I suggest the first one, because you don't have to
>change the cast when you decide to use __time64_t instead of DWORD.) But
>remember that such a program will fail in the late afternoon of 2038-01-18.
Actually, as that program was written, it will still work. In January of
2038, time() rolls over from 31 bits to 32 bits. As long as you treat it
as an unsigned value, it will be fine until 2106.
The problem is that lots of code interprets negative time_t values as
referring to times between 1903 and 1970.
--
- Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
.
- Follow-Ups:
- Re: Return value of _time64() in VS2005
- From: babak
- Re: Return value of _time64() in VS2005
- References:
- Return value of _time64() in VS2005
- From: babak
- Re: Return value of _time64() in VS2005
- From: Heinz Ozwirk
- Return value of _time64() in VS2005
- Prev by Date: Re: Return value of _time64() in VS2005
- Next by Date: dynamic text to balloon tip
- Previous by thread: Re: Return value of _time64() in VS2005
- Next by thread: Re: Return value of _time64() in VS2005
- Index(es):
Relevant Pages
|