Server time in PHP?

software development

#1

Hey everyone,

Just wondering if you guys have any experience with or thoughts about an issue I’ve been having.

I’ve got the following code running on my server (Renault):


touch(‘touchFile’);
print date(‘r’, filemtime(‘touchFile’)) . ‘
’ . date(‘r’) . ‘
’ . (filemtime(‘touchFile’) - time());


And I get this back when I run the script:


Sun, 08 Jul 2007 12:42:17 -0700
Sun, 08 Jul 2007 12:55:06 -0700
-769


The DreamHost guys say that the server’s synced up with a time server correctly (and the PHP time looks that way), but the file modification time seems to be off by that 769 second mark. I’ve tried clearstatcache() and that doesn’t seem to work. Anyone have any ideas why this’d be happening?

Thanks!