Re: Date function
- From: boyd <tbmoore9@xxxxxxxxxxx>
- Date: Tue, 28 Nov 2006 22:42:47 GMT
In article <4t3qsqF11g6o6U2@xxxxxxxxxxxxxxxxxx>,
Gunnar Hjalmarsson <noreply@xxxxxxxxx> wrote:
boyd wrote:
something like:
my( $day, $mon, $yr ) = ( localtime( time - 24*3600) )[3, 4, 5];
$yr += 1900;
$mon += 1;
my $str = sprintf '%4d-%02d-%02d', $yr, $mon, $day;
would give you the prefix string for your filename.
What about DST? ;-)
Good point. So my method would mess up on one of the DST changeovers if
it ran between midnight and 0100 local. Is that right? What is the
"40000" for in your script?
Boyd
.
- Follow-Ups:
- Re: Date function
- From: Gunnar Hjalmarsson
- Re: Date function
- References:
- Date function
- From: K.J. 44
- Re: Date function
- From: boyd
- Re: Date function
- From: Gunnar Hjalmarsson
- Date function
- Prev by Date: Re: Bareword errors?
- Next by Date: Re: Date function
- Previous by thread: Re: Date function
- Next by thread: Re: Date function
- Index(es):
Relevant Pages
|