Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my $tstamp = get_timestamp(); print "\n\n $tstamp \n\n"; # 1900-01-01 00:00:00.000 sub get_timestamp { my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(t +ime); $year=$year+1900; return $year . sprintf('%02u%02u %02u%02u%02u', $mon, $mday, $hour, $m +in, $sec); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Timestamp Format Help!
by Corion (Patriarch) on Mar 05, 2010 at 19:23 UTC | |
|
Re: Timestamp Format Help!
by almut (Canon) on Mar 05, 2010 at 20:15 UTC | |
|
Re: Timestamp Format Help!
by jffry (Hermit) on Mar 05, 2010 at 20:24 UTC | |
|
Re: Timestamp Format Help!
by Corion (Patriarch) on Mar 05, 2010 at 19:22 UTC |