Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: epoch time

by jbert (Priest)
on Jan 31, 2007 at 17:36 UTC ( [id://597579]=note: print w/replies, xml ) Need Help??


in reply to epoch time

The first rule of coding club is: "never implement your own date/time/timezone handling code".

The above advice about Time::Local is good, but if it weren't, your best option would be to effectively copy the code you need from one of the modules you listed.

If you were to consider doing it yourself, don't forget to think about whether you need to take account of: timezones (numeric), timezones (named), leap years, leap seconds, daylight savings time (in all the different timezones, changing over the years) and how comprehensive your test suite needs to be. I think timezones possibly also move on a scale of decades.

Also don't forget to think about whether someone else will be calling your code for similar purposes but who does need to worry about such things.

(The second rule of coding club is "never implement your own character escaping/unicode/charset conversion code").

Replies are listed 'Best First'.
Re^2: epoch time
by jdtoronto (Prior) on Jan 31, 2007 at 18:11 UTC
    The third rule is "don't write your own HTML parsing or templating code"

    The fourth rule is "don't write your own XML parsing code".

      Don't forget, "don't write your own encryption/hashing code"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://597579]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-20 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found