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

[MacPerl] Time::localtime not Y2K.



Hello list,

For a while i use in my script the module locatime without asking any
questions. So when i need the full date i act as a Pavlovian dog and use
the same piece of script.

And now my error log print :


Thu, 30-12-99 19:0:13 GMT no connexion
Thu, 6-1-100 17:1:51 GMT no connexion

Happy to learn that after 1999, we are in 19100. :-)

I use the following line with the same result on my Mac or on my web
Solaris site:

	use Time::localtime;

	$sec=localtime->sec();
	$min=localtime->min();
	$hour=localtime->hour();
	$mday=localtime->mday();
	$mon=localtime->mon();
	$year=localtime->year();
	$wday=localtime->wday();

and the ouput :
....
$fh->print($day, ", ", $mday, "-", $mon+1, "-", $year, " ", $hour, ":",
$min, ":", $sec, " GMT  no connexion \n");
....

So looking to the pod, the exemple code say :

 use Time::localtime;
 printf "Year is %d\n", localtime->year() + 1900;

what over ride the so call problem.

My question is :

isn't it any nicer method ?

Or  is it THE right method ?
Or did i miss some interresting discution about  Y2K on the list ?
Or  is it a new module i don't know ? (i did check cpan)
Is that module deprecated ? (it doesn't appear at cpan.org)

Thank you for the light.

MJM

######################################################
                               mailto://mjm@aix.pacwan.net

                                       Jean-Michel MEYER
                                  Journaliste - Photographe

                  "Pourquoi les chameaux ne sourient jamais ?"

Perlish :-)


http://www.azur-press.com  mailto://mjm@azur-press.com
######################################################



# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org