Re: Return value of _time64() in VS2005
- From: "babak" <babak.ayani@xxxxxxxxx>
- Date: 3 Jan 2006 00:21:04 -0800
Tim Roberts wrote:
> "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.
Thankyou guys. It is all clear to me now and my program works as well.
/Babak
.
- References:
- Return value of _time64() in VS2005
- From: babak
- Re: Return value of _time64() in VS2005
- From: Heinz Ozwirk
- Re: Return value of _time64() in VS2005
- From: Tim Roberts
- Return value of _time64() in VS2005
- Prev by Date: Re: OnPaint leaves some areas un-painted
- Next by Date: File system filter
- Previous by thread: Re: Return value of _time64() in VS2005
- Next by thread: VS2005: How to build(link) a W32 Console (.EXE) that contains EVERYTHING?
- Index(es):