Forums

Time Machine plugin - Incorrect time/date (2 posts)

  1. geofffox
    Member
    Posted 3 years ago #

    First--this plugin is great! My blog goes back to 2003 so there's always good stuff to see and remember.

    It looks like the plugin changes the date at 00UTC--as the server is set to UTC. However, my blog runs EST which is UTC-5 and is set that way in the WordPress localizations.

    Is there any way to fix this?

    Geoff Fox
    http://www.geofffox.com

    http://wordpress.org/extend/plugins/time-machine/

  2. debirobarts
    Member
    Posted 2 years ago #

    I know I'm a million years late for you but I just installed this plugin and came up with the same problem. Here's the fix:

    Ok look for:

    // setup jocker date range

    Under that I believe it said:

    $tm_time = "2%-".gmdate("m-d")." %:%:%";

    Or something similar? Change that line to:

    $tm_time = "2%-".date("m-d")." %:%:%";

    Now look for:

    function time_machine($args) {

    (This should be a little above what you just were working on)

    Under that add:

    date_default_timezone_set('Canada/Eastern');

    Now where it says "Canada/Eastern" enter the timezone you are in (list is here: http://www.php.net/manual/en/timezones.php )

    Ideally I'd want this to show based on the time zone of the reader, however I didn't drink enough coffee today and I just got out of yoga so my mind is kind of mush. This makes it related to the time zone you set.

    Hope it helps.

Topic Closed

This topic has been closed to new replies.

About this Topic