[thelist] Perl problem and question
John Meyer
john_meyer at geocities.com
Sat Aug 4 18:07:59 CDT 2001
At 05:36 PM 8/4/2001 -0500, you wrote:
>My server date shows the correct date, but in perl, I am a month
>off. This is the code I am using to get the date/time.
>($second,$minute,$hour,$month_day,$month,$year) = (localtime)[0,1,2,3,4,5];
>and it is returning 07/04/2001 17:17:6.
Just add one to the month, it's a zero based array.
>
John Meyer
john_meyer at geocities.com
Programmer
Don't let experience be your end all and be all. Remember:
*Amateurs built the ark
*Professionals built the Titanic
More information about the thelist
mailing list