• Hi there,

    When I activate the plug, my site wide times are all pushed out by plus one hour. This is causing issues with scheduled posts, etc.

    Deactivating the plugin resets the times back to actual and expected values. My timezone is set as London.

    Is there a solution this?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author xnau webdesign

    (@xnau)

    The plugin uses the timezaone setting you are using in the general WordPress settings. It does set the PHP timezone using that setting to make sure PHP is using the correct timezone.

    Hi.

    I have the same issue.
    Activating plugin messes up in both calendars I use in my website (adds two hours everywhere).
    I’ve checked it thoroughly, all settings & timezones (Poland +1 or 2h) are fine everywhere and work as they should.

    Your plugin does something global that has an effect on the entire site.

    Is there a way to sort it out?
    I’d really like to build a huge database relying on Your plugin.

    Any tips?

    Plugin Author xnau webdesign

    (@xnau)

    This suggests your WordPress timezone is set to UTC or some non-standard value. The plugin uses the WordPress timezone value to set the timezone for PHP, but if the value is missing or invalid, it will revert to UTC.

    Yes, my WP timezone is set for Warsaw (currently UTC+2h) and all plugins or other scripts work fine. Please correct me if I’m wrong but there must be something in your plugin that works globally and forces changes of time on the entire site. I’d rather suspect the opposite action: time in the plugin could have been wrong due to server or WordPress settings, NOT vice versa.

    Of course there also might be a conflict somewhere ‘cos I have a big, heavy modificated site with fifty plugins.

    I’ll play around with this later.

    Plugin Author xnau webdesign

    (@xnau)

    As I mentioned, the plugin tells PHP to use the WordPress timezone setting. This could have a global effect if you have PHP defaulting to another timezone.

    If you want to prevent the plugin setting the PHP timezone, you will need to modify the code. I plan to put a filter on this so that it can be done without modifying the code, but for now, you’ll need to do it like this…

    in the plugin file classes/PDb_Date_Display.class.php on line 98, you’ll find:

    date_default_timezone_set( self::timezone() );

    if you comment that out like this, it will prevent the PHP timezone getting set:

    //date_default_timezone_set( self::timezone() );

    This was needed because the timezome on some setups reverts to the server timezone, causing time shifts. This code keeps PHP in sync with WordPress.

    It did the trick!
    Thank you very much.

    Now I just have to sit down and find out the smartest way to group few thousands of data for cool displaying and searching… I’ve read the documentation and have an idea.

    Anyway, thank you for a fantastic tool to do such things and for the superb support.

    Cheers!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Activating Plugin Adds +1 Hour to Site Times’ is closed to new replies.