in reply to Re^2: epoch time
in thread epoch time

I think timelocal() wants the year to be years since 1900

That would make sense. But the documentation says:

Strictly speaking, the year should also 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:

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

Replies are listed 'Best First'.
Re^4: epoch time
by johngg (Canon) on Jan 31, 2007 at 17:24 UTC
    Looks like I have been coding under a false assumption all these years. I thought the year had to be consistent with localtime() and didn't know there was a human-friendly set of rules.

    Thank you for educating me.

    JohnGG