in reply to Re: Date to epoch
in thread Date to epoch

So here we go again ... welcome to the Y2038 problem. That’s only 26 years away now.   Plenty of time to say the sky is falling... again.

Plenty of time to write the books ... and to make the tin-foil hats.

P.S.:   I actually collected “Y2K books” at that time, knowing that they’d be gone in an instant ...

Replies are listed 'Best First'.
Re^3: Date to epoch
by Marshall (Canon) on Jul 21, 2012 at 23:43 UTC
    from local Time

    Strictly speaking, the year should be specified in a form consistent with localtime(), i.e. the offset from 1900. In order to make the interpretation of the year easier for humans, however, who are more accustomed to seeing years as two-digit or four-digit values, the following conventions are followed

    Years greater than 999 are interpreted as being the actual year, rather than the offset from 1900. Thus, 1964 would indicate the year Martin Luther King won the Nobel prize, not the year 3864.

    Years in the range 100..999 are interpreted as offset from 1900, so that 112 indicates 2012. This rule also applies to years less than zero (but see note below regarding date range).

    Years in the range 0..99 are interpreted as shorthand for years in the rolling "current century," defined as 50 years on either side of the current year. Thus, today, in 1999, 0 would refer to 2000, and 45 to 2045, but 55 would refer to 1955. Twenty years from now, 55 would instead refer to 2055. This is messy, but matches the way people currently think about two digit dates. Whenever possible, use an absolute four digit year instead.

    The scheme above allows interpretation of a wide range of dates, particularly if 4-digit years are used.

    I have a 6 Mhz, pre-production PC with a Quantum "Hard Card" => This is free to "good home".
    This is a part of the history of the PC. Contact me if you are interested.

    Computer are faster and have more storage than the Y2K models.
    Most folks are aware of this issue and use 4 digits for the year and DB's can handle that.