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().
In reply to Re: time() off
by edan
in thread time() off
by ketema
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |