Re: Return value of _time64() in VS2005



"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.
.



Relevant Pages

  • Re: Return value of _time64() in VS2005
    ... Tim Roberts wrote: ... >>The common description of timeand _time64() says that the function ... >>declaration above. ...
    (microsoft.public.vc.language)
  • Re: Common programming mistakes?
    ... I think of some kind of list that states the most common ... programming errors together with their frequency and the cost to find ... a declaration hides another declaration ... uninitialized memory (eg: using malloc and forgetting to use memset or such ...
    (comp.lang.misc)
  • Re: Fortran Standard question: COMMON, SAVE and EQUIVALENCE
    ... the main program declares a blank common block of length 149. ... but one declaration isn't the master one. ... subroutine sub ...
    (comp.lang.fortran)
  • Re: Common block file
    ... The bulk of the files are auto declared using the i-n option ... In that case you are going to have to keep the common statement inside the module - because it's the only declaration of the variables. ... That doesn't hurt, but it will make it a bit more awkward to make some other modernisations/improvements (such as making some of the arrays allocatable, allowing greater flexibility in the size of problem you can consider) - you can't do that with an array in common, but you can with an array in a module. ...
    (comp.lang.fortran)
  • Re: Declaration order
    ... but not with Compaq v6.6: ... The declaration of the array comes before the declaration of its ... dimension which comes through a common block. ... supplying the value of myn ...
    (comp.lang.fortran)