in reply to Re^2: epoch time
in thread epoch time
I think timelocal() wants the year to be years since 1900
It accepts both.
why not set the hash up with the subtraction by one already done?
I like $m having a natural value like $d (1..~31) and $y (19xx) do. I always follow localtime and gmtime with $m++; $y += 1900;, and I always specify $m-1 for timelocal and timegm. Not seeing $m-1 raises alarms in my head.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: epoch time
by johngg (Canon) on Jan 31, 2007 at 20:17 UTC |