in reply to time() off
The perl time function returns epoch time, which is likely to be (except on strange sysmtems) "the number of non-leap seconds since 00:00:00 UTC, January 1, 1970" That means it's in "GMT" (or UTC) time. If you want the local time, you want to feed the value of time to the (conveniently named) function localtime. If you want that pretty string like "Thu Sep 9 09:31:13 2004" then call localtime in scalar context. If you have more specific formatting needs, I would use POSIX::strftime().
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: time() off
by ketema (Scribe) on Sep 09, 2004 at 13:49 UTC | |
by ketema (Scribe) on Sep 09, 2004 at 13:54 UTC | |
by edan (Curate) on Sep 09, 2004 at 14:02 UTC |