Re: Time::Local let me faint
- From: krahnj@xxxxxxxxx (John W. Krahn)
- Date: Tue, 29 Aug 2006 20:48:34 -0700
Jeff Pang wrote:
So if you want to translate 31 August 2006 you have to subtract one from the
month and 1900 from the year:
$ perl -Mstrict -MTime::Local -le 'print timelocal(0,0,0,31,7,106)'
1157007600
John,
For the instance described by you,both '2006' and '106' are right.
$ perl -Mstrict -MTime::Local -le 'print timelocal(0,0,0,31,7,106)'
1156953600
$ perl -Mstrict -MTime::Local -le 'print timelocal(0,0,0,31,7,2006)'
1156953600
The reason that '2006' works is because Time::Local makes a guess that '2006'
actually means '106'.
John
--
use Perl;
program
fulfillment
.
- Follow-Ups:
- Re: Time::Local let me faint
- From: Paul Lalli
- Re: Time::Local let me faint
- References:
- Re: Time::Local let me faint
- From: Jeff Pang
- Re: Time::Local let me faint
- Prev by Date: Re: STDOUT and STDERR to same file
- Next by Date: Print to new file for each results
- Previous by thread: Re: Time::Local let me faint
- Next by thread: Re: Time::Local let me faint
- Index(es):
Relevant Pages
|