Re: Time::Local let me faint
- From: pangj@xxxxxxxxxxxxx (Jeff Pang)
- Date: Tue, 29 Aug 2006 23:21:58 -0400 (EDT)
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
--
Jeff Pang
NetEase AntiSpam Team
http://corp.netease.com
.
- Follow-Ups:
- Re: Time::Local let me faint
- From: John W. Krahn
- Re: Time::Local let me faint
- Prev by Date: Re: splitting strings
- Next by Date: Re: STDOUT and STDERR to same file
- Previous by thread: Re: Time::Local let me faint
- Next by thread: Re: Time::Local let me faint
- Index(es):