+ Reply to Thread
Results 1 to 3 of 3

Thread: Todays visitors

  1. Todays visitors

    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

  2. Join Date
    Aug 2004
    Posts
    781

    Todays visitors

    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.

    Code:
    <?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";

  3. Todays visitors

    thnx Patiek, nice one! dont forget the ?>
    I should have set it to 7 and not 8.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts