You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Randy Nivales <ra...@email.com.ph> on 2000/07/06 10:55:53 UTC
date
does anybody here knows why i sometimes get a 16 hrs delay when i use this
code below to get the date?
($sec, $min, $hour, $mday, $mon, $year, $wday) =
(localtime(time))[0,1,2,3,4,5,6]
$year += 1900;
here are my outputs...
July 6, 2000:14:18:38
July 5, 2000:22:18:38
July 6, 2000:15:58:8
July 6, 2000:16:18:16
July 6, 2000:16:19:47
July 6, 2000:0:43:26
July 6, 2000:16:43:55
July 6, 2000:16:45:15
July 6, 2000:0:45:43
July 6, 2000:0:45:56
July 6, 2000:0:46:4
July 6, 2000:0:46:10
.......................................................
: o/ Randy B. Nivales :
: <| randy@email.com.ph :
: / > http://www.emc.com.ph :
: (632) 638-4483 loc. 125 Phone :
: (632) 632-7319 Fax :
:......................................................:
RE: date
Posted by Gerald Richter <ri...@ecos.de>.
> does anybody here knows why i sometimes get a 16 hrs delay when i use this
> code below to get the date?
>
> ($sec, $min, $hour, $mday, $mon, $year, $wday) =
> (localtime(time))[0,1,2,3,4,5,6]
Just writing
($sec, $min, $hour, $mday, $mon, $year, $wday) = localtime ;
has the same result and is a little nicer...
> $year += 1900;
>
> here are my outputs...
>
Looks like your Apache child runs on different timezones...
Try [+ scalar (localtime) +] inside your page. Do you see the same result?
If not there must be an error in your code, if yes I guess some of your
scripts/modules changes the timezone.
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------