[ Don't Cc: me, I read this mailing list, thank you ]

>> Troy May <[EMAIL PROTECTED]> writes:

 > ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
 > $thisday = (Sun,Mon,Tue,Wed,Thu,Fri,Sat)[(localtime) [6]];
 > $s = (localtime)[0];
 > $m = (localtime)[1];
 > $m = ($m + 35) ;

 Is adding 35 minutes to the current date what this is all about?

 How about:

    ($sec, $min, $hour, $mday, $mon, $year) = (localtime(time+35*60))[0..5];

 and save yourself from all that adding and carrying?

 By the way, in the original program, if you happen to run it at, say
 23:59:59 and the clock changes to 0:00:00 while the program is still
 running, between one of the calls to localtime, you'll get horribly
 incorrect results.

 > $year %= 100;

 > Now, when he prints "$theDate", everything is ok with it (format-030302).
 > But when he prints just "$year" it displays "2" instead of "2002"

 2002 % 100 == 2

-- 
Marcelo

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to