[chora] bug && bugfix again...

Mathieu Arnold arn_mat@club-internet.fr
Wed, 11 Apr 2001 00:15:34 +0200



Chuck Hagenbuch wrote:
> 
> Quoting Mathieu Arnold <arn_mat@club-internet.fr>:
> 
> > well, i know that, but, on my php, the time() function returns the
> > current time adding 2 hours, I know it sounds crazy, but that's what it
> > is. I committed a file just a few seconds ago, and when i put a
> > print strftime("%D %T",time()).'<br>'.strftime("%D %T",$date).'<br>';
> > just after the $secs = time() - $date;
> > here is what i have :
> > 04/10/01 22:22:18
> > 04/10/01 20:22:14
> 
> Are clocks off between two machines, or something? Does php return the correct
> time by itself?

well, i did all stuffs on the same machine.

Anil Madhavapeddy wrote:
> 
> > well, i know that, but, on my php, the time() function returns the
> > current time adding 2 hours,
> 
> Your system clock is definitely set right?
> 
> Try:
> 
> $ perl -e 'print time()."\n"'
> 
> And compare that to a PHP script which does
> 
> <? print time() ?>
> 
> And put that through 'date -r' to confirm it's correct.

perl and date returns the same as php, the local time with time zone.

-- 
Mathieu Arnold