in reply to Perl tandem time conversion
Richardsub iso_timestamp { # create a string containing todays date and time in ISO format my $t = shift || time; my ($sec, $min, $hour, $mday, $mon, $year, $wday,$yday,$isdst) = localtime $t; $year += 1900; $mon += 1; return sprintf ("%04d" . "/"."%02d". "/"."%02d". " "."%02d". ":"."%0 +2d". ":"."%02d", $year, $mon, $mday, $hour, $min, $sec); } # end of iso_timestamp
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Perl tandem time conversion
by cosmicsoup (Beadle) on Aug 22, 2002 at 20:38 UTC | |
by greenFox (Vicar) on Aug 23, 2002 at 04:45 UTC | |
by blakem (Monsignor) on Aug 24, 2002 at 02:36 UTC |