Perl-Sensitive Sunglasses | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The UNIX epoch timestamp, being the number of seconds elapsed since midnight Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds has no problems with daylight savings time adjustments. That is something you will have to look into only at the level of printing "human readable" output for a particular time-zone.
The internal format is therefore best left and stored as a timestamp and converted into whatever you need upon preparing the output. The docs at DateTime say: use UTC for all calculationsArguably DateTime is the best for making such conversions, but yes it is a heavy and relatively slow module, but you pay that price only once at start-up. CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James In reply to Re^2: Simple date and time manipulation
by CountZero
|
|