• Resolved marcolisi1

    (@marcolisi1)


    When the WordPress timezone setting is set to UTC+0 and the Timeframe of the plugin is set to Future or Past, then $current_date string is blank (line 963 of class.timeline-express.php).

    A simple fix would be to change the line to strtotime( 'today +' . $offset )

    Just an additional + sign instead of an if statement as the function strtotime is intelligent enough to parse it properly. I tested it as well. 🙂

    Anyway, I leave it up to you. 🙂

    By the way, thanks! A wonderful plugin.

    https://ww.wp.xz.cn/plugins/timeline-express/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Evan Herman

    (@eherman24)

    Hi Marcolisi1,

    I was just about to push out a new patch which enhances all of the styles bundled with the plugin. I’m going to look into this issue , patch it up and include it in this release.

    Thanks for the heads up and the tip on how to get it resolved!

    Evan

    Plugin Author Evan Herman

    (@eherman24)

    Hi marcolisi1,

    I’ve incorporated this patch into the latest release, v1.1.6.5.

    Thanks again for the tip on getting it resolved!

    Evan

    Thread Starter marcolisi1

    (@marcolisi1)

    Hello Evan,

    I just downloaded the latest version and I have been testing the Timeframe, and I would need to apologize because for some reason, even though I had tested it, the additional “+” does not seem to work in all cases.

    Just a question but what is intended with the $offset = get_option('gmt_offset');
    $current_date = strtotime( 'today ' . $offset );
    ?
    Is it to have the current date in UTC or the current date according to the timezone of the blog. I suppose that it is the date according to the timezone of the blog.

    If so and from tests:

    • strtotime('today') returns the date in UTC
    • strtotime('today +' . $offset) intends to return the date according to the blog’s timezone. Tests show that this method seems to be problematic also when the timezone is a fraction, e.g. +1:30
    • the function current_time (see WordPress codex : https://codex.ww.wp.xz.cn/Function_Reference/current_time) returns the time according to the blog’s timezone. So one way to completely bypass manually calculating the current date would be to use this function.
    • Therefore, 2 ways to use the current_time function would be as follows: $current_date = strtotime(current_time( 'Y-m-d' )); or $current_date = strtotime(substr(current_time( 'mysql' ), 0, 10));. This way it should always work.

    Sorry for any inconvenience. I am just trying to help. Please review and test. I would be glad to hear your expert advice.

    Thanks again for the great work,
    Marco

    Plugin Author Evan Herman

    (@eherman24)

    The intention was to alter the date and time based on the users timezone.

    I will be rolling back to the previous version as the latest release has caused far too many problems for our users.

    Moving forward users will need to make adjustments to their child theme if they want to alter any aspect of the timeline. Anyone with more advanced alterations or questions will need to purchase a license for support.

    Thanks,
    Evan

    Plugin Author Evan Herman

    (@eherman24)

    Hi Marco,

    I’ve just rolled things back to the previous version in the 1.1.6.6 release. I will have to take a look into the issues you mentioned above.

    Thanks,
    Evan

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Bug with Timeframe when UTC 0’ is closed to new replies.