[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] time/ date



$mon is 0 to 11, and $wday is 0 to 6.
So, $mon=1 means February, and $wday=5 means Friday.


At  7:49 PM 96.2.16 -0800, jg wrote:
>am trying to print current time and date.
>
>this works fine except
>
>
>@t = ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =  localtime(time);
>printf "%d:%d:%d:%d:%d:%d:%d:%d:%d:\n\n", @t;
>
>-----------it returns
>
>35:45:19:16:1:96:5:46:0:
>
>that's January for the month.
>I checked my control panels and I'm in February alright.
>
>anybody know what gives?
>
>janis

------------------------------------------------------------
Teruya Ezaka (ezaka@NetLaputa.or.jp) / Chofu-Shi,Tokyo,JAPAN