Forums

[Plugin: Visitor Maps and Who's Online] Change Timezone (5 posts)

  1. miguelnetto
    Member
    Posted 2 years ago #

    Hi,

    Who´s OnLine is show me the GMT + 2. Where or how to correct to my TimeZone. Thanks for this great plugin.

    http://wordpress.org/extend/plugins/visitor-maps/

  2. Mike Challis
    Member
    Posted 2 years ago #

    First check the WP time zone:
    WP admin - Settings - General - Timezone

    The timezone settings work better on the newer versions of PHP5 and WP 2.8 and higher.
    If you have an old version of WP or PHP4 then the visitor maps time might not align with the WP timezone setting. If that is the case, the timezone could be changed in PHP at run time, although I prefer the WP setting.

  3. miguelnetto
    Member
    Posted 2 years ago #

    Hi Mike,

    Something going wrong. My server is running PHP 5 and WP-2.9.1. The timezone is set in WP to -2 just to correct the daylight time in my country because really is -3. My dedicated server is set do timezone -2 too. Well, visitors-maps is chanching -2 by +2. To test, I changed the timezone in WP to +2 and back to -2 and now VM is showing just the UTC time and the wrong +2 timezone disappear.

    I take this opportunity to congratulate you for maintaining this very useful plugin and others of your own that I'm using.

  4. Mike Challis
    Member
    Posted 2 years ago #

    Here is how to hard code the timezone setting inside wp-config.php

    // Set the timezone for your location,
    // because some servers are in different timezone than your location
    // http://saratoga-weather.org/timezone.txt  has the list of timezone names
    // uncomment one myTZ setting: NOTE: this *MUST* be set correctly
    //$myTZ = 'America/New_York'; // Eastern Time
    //$myTZ = 'America/Chicago';  // Central Time
    //$myTZ = 'America/Denver';   // Mountain Time
    //$myTZ = 'America/Phoenix';  // Mountain Standard Time - Arizona
    $myTZ = 'America/Los_Angeles';  // Pacific Time
    // Set timezone in PHP5/PHP4 manner
    if (!function_exists('date_default_timezone_set')) {
            putenv("TZ=" . $myTZ);
    } else {
            date_default_timezone_set("$myTZ");
    }
  5. miguelnetto
    Member
    Posted 2 years ago #

    [SOLVED] I saw in WP timezone adjusts two options in the drop down menu to set this: by city name and manual mode. He was set in manual mode where you just choose the timezone -2 etc.. Was wrong !

    When I switched to the mode using the name of the city (top options) and I chose my city everything worked perfectly included the daylight time. Thank you for the help that led me to the solution.

Topic Closed

This topic has been closed to new replies.

About this Topic