PDA

View Full Version : Todays visitors



blue_skies
04-04-2005, 04:35 PM
Why has my today's visitors display changed before the day is complete? I think the visitors for the day have changed before 12 midnight, maybe around 11 or earlier. I have set the option in the counter.php file so that to correct the difference between my server and my local time. I am 8 hours ahead of server time, so i set 8 there. Any clues, of why is not exact? Do i need to change anything else?
Thanx

Patrick
04-04-2005, 04:49 PM
Your time setting is still likely incorrect.

Here is a quick script to test it. Place this into a file called timetest.php, upload it, and visit it in your browser. You can change the $time_offset variable at the top of the file to try different time offset values.


<?php

// number of hours to offset time (can be positive or negative):
$time_offset = 8;

// no need to edit below this

$current_time = time();
$modified_time = time() + (3600 * $time_offset);

echo "Date without time modification (server time): " . date("l dS of F Y h:i:s A", $current_time) . "<br>\n";
echo "Date with time modification: " . date("l dS of F Y h:i:s A", $modified_time) . "<br>\n";

blue_skies
04-05-2005, 10:13 AM
thnx Patiek, nice one! dont forget the ?> :)
I should have set it to 7 and not 8.