Re: Date function



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
.



Relevant Pages

  • Re: the trouble with DST is
    ... we don't mess around with DST here in Arizona. ... the world in sync screwed up us modern DST-free time zones. ...
    (rec.bicycles.misc)
  • Re: the trouble with DST is
    ... we don't mess around with DST here in Arizona. ... the world in sync screwed up us modern DST-free time zones. ...
    (rec.bicycles.misc)
  • Re: Date function
    ... Gunnar Hjalmarsson wrote: ... would give you the prefix string for your filename. ... What about DST? ... So my method would mess up on one of the DST changeovers if ...
    (comp.lang.perl.misc)
  • Re: daylight savings
    ... Eye <heart> DST. ... I mess it alreaty. ...
    (rec.sport.football.college)