in reply to seconds into a date

localtime and friends use UNIX time which is not a completely accurate measure of how many seconds has passed since 1970. It is very easy to use, but your results will be slightly off because of the way leap seconds are treated, see Unix time.

I am not aware of any perl module that does positively treats leap seconds correctly.

Replies are listed 'Best First'.
Re^2: seconds into a date
by afoken (Chancellor) on Jul 02, 2009 at 07:09 UTC
    I am not aware of any perl module that does positively treats leap seconds correctly.

    DateTime seems to have proper leap second support, at least it has and uses a table of all leap seconds.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
      Be aware, however, that there is no implementation of leap seconds which can be valid for all jurisdictions. See an example in javascript here http://www.ucolick.org/~sla/leapsecs/epochtime.html