akrrs7 has asked for the wisdom of the Perl Monks concerning the following question:
this works fine...except when I use(my $sec, my $min, my $hour, my $mday, my $mon, my $year, my $wday, my + $yday, my $isdst ) = localtime(time); my $adjustedYear = $year + 1900; my $adjustedMon = $mon + 1; my $timestamp = sprintf( "%4.4d%2.2d%2.2d%2.2d%2.2d_%d", $adjustedYear, $adjustedMon, $mday, $hour, $min, $$ );
Then I get 1900.... Doesn't make sense Thanks !!!use Time::localtime;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: getting system time
by choroba (Cardinal) on Dec 02, 2011 at 16:29 UTC | |
|
Re: getting system time
by TJPride (Pilgrim) on Dec 02, 2011 at 16:25 UTC | |
by aaron_baugher (Curate) on Dec 02, 2011 at 17:58 UTC | |
|
Re: getting system time
by Anonymous Monk on Dec 02, 2011 at 16:12 UTC | |
by akrrs7 (Acolyte) on Dec 02, 2011 at 16:16 UTC | |
by Eliya (Vicar) on Dec 02, 2011 at 16:23 UTC |