Calendar Thinks it's Tomorrow Already

Home Forums Calendar Products Events Calendar PRO Calendar Thinks it's Tomorrow Already

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1003120
    mrjarbenne
    Participant

    In both version 3.11.2 and now having recently updated to 3.12 hoping it would fix it, I’m noticing that my calendar thinks it’s tomorrow already, even though I’ve set the time in Settings/General to Toronto. I went in and changed it to manual UTC-4 and the same issue exists.

    Here’s an image: http://www.screencast.com/t/oJgUs5eVoj

    In the settings it looks like the server time is UTC, but the WordPress time is correct. Shouldn’t the setting the admin sets supercede where the server is located?

    http://www.screencast.com/t/PrfgQKaKL7b

    #1003303
    Brian
    Member

    Hi,

    Thanks for using our plugins and sorry for the issues you are having.

    Is this with all the Event Views (month, list, week, etc?) and with the widgets as well?

    I am going to test it out tonight and see if it does it on my site as well as I am in the same timezone.

    Let me know about my question and we can go from here.

    Thanks

    #1003316
    mrjarbenne
    Participant

    It’s the month view and the widget. I didn’t check the other views, but I will tonight.

    The server time being shown in the Settings of the plugin is wrong actually. I checked with my host and the server time is set to the correct time:

    root@hwdsb1 wp-content]# date
    Tue Sep 8 21:47:34 EDT 2015

    [root@hwdsb1 wp-content]# cat /etc/timezone
    America/Toronto

    [root@hwdsb1 wp-content]# grep date.timezone /etc/php5/fpm/php.ini
    date.timezone = “America/New_York”

    #1003673
    Brian
    Member

    Hi,

    Thanks for the information.

    I believe it is happening in just the Week and Month Views as they use this to check if it is today:

    strtotime( 'today' );

    However, it does not account for timezones so at 8pm it thinks it is tomorrow in our timezone.

    This fixes it:

    strtotime( current_time( 'Y-m-d' ) );

    So I am writing a ticket to get this addressed, but I do not have a timeline when it might be released.

    Let me know if you have any follow up questions.

    Thanks

    #1003679
    mrjarbenne
    Participant

    Hey Brian,

    Thanks for your prompt attention to this matter. In the past, issues like this have been addressed in the short term with a code snippet. Any chance something like that might be created, particularly if the timeline is going to be longer than a week or so?

    Never hurts to ask.

    Cheers,

    Jared

    #1003705
    Brian
    Member

    Hi,

    There is no snippet that can fix this.

    However, you could modify two lines of coding to fix this.

    In this file on line 359:

    events-calendar-pro\src\Tribe\Templates\Week.php

    And in this file online 852:

    the-events-calendar\src\Tribe\Template\Month.php

    Change this:

    strtotime( 'today' );

    To this:

    strtotime( current_time( 'Y-m-d' ) );

    This worked in my testing.

    We have a maintenance release coming out in the next couple of days so this will not be included in it as we are finished testing it and cannot add anything else.

    If you make these changes and update the plugin with that release you will have to make the edits again.

    This should be included in the next release after that though.

    Thanks

    #1004034
    mrjarbenne
    Participant

    That looks to have solved it. I won’t know for sure until Midnight, but thanks in advance for what looks to be a good temporary fix.

    #1004040
    Brian
    Member

    Sounds good.

    We will update this ticket when we have a fix released.

    I will be working on patching it tomorrow and having a release in a couple weeks at the latest.

    In the mean time I will close this thread to new replies. It does not mean the issue is closed, just new replies. If you have something new to add please just create a new thread and reference this one and we can help out.

    Cheers

    #1008126
    Geoff
    Member

    Hey there,

    Just want to let you know that we just shipped an update and a patch for this issue was included. Please update and feel free to drop us a new note if you continue to bump into any issues with this. We appreciate your patience while we worked on this–thanks for your support!

    Cheers,
    Geoff

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Calendar Thinks it's Tomorrow Already’ is closed to new replies.