The PHP getdate function should be reading your system clock directly.
Here's a quickie way to see exactly what PHP is showing as the time and date, unmodified. Make a blank file, say time.php and paste this into it:
- Code: Select all
<?php
$today = getdate();
print_r($today);
?>
And see what you get back. (It'll be an exploded array, in 24 hour format) It
should match your system's clock. (Daylight savings is handled by Windows so it'll be accurate regardless. If using Linux, it might come back in Universal Time)
Some PHP scripts need to be given a hint though. (Good example is a forum. They typicall have a time offset somewhere) Does the PHP code have an offset somewhere that may need an adjustment? (IE, setting it to 0) If the above code is reporting back the right time (which it should, assuming your system clock is accurate) its the PHP code.