Home › Forums › Calendar Products › Events Calendar PRO › Calendar Thinks it's Tomorrow Already
- This topic has 8 replies, 3 voices, and was last updated 10 years, 6 months ago by
Geoff.
-
AuthorPosts
-
September 8, 2015 at 6:00 pm #1003120
mrjarbenne
ParticipantIn 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?
September 9, 2015 at 8:18 am #1003303Brian
MemberHi,
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
September 9, 2015 at 8:28 am #1003316mrjarbenne
ParticipantIt’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”September 10, 2015 at 7:48 am #1003673Brian
MemberHi,
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
September 10, 2015 at 7:55 am #1003679mrjarbenne
ParticipantHey 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
September 10, 2015 at 8:23 am #1003705Brian
MemberHi,
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
September 10, 2015 at 5:49 pm #1004034mrjarbenne
ParticipantThat 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.
September 10, 2015 at 6:06 pm #1004040Brian
MemberSounds 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
September 23, 2015 at 4:50 pm #1008126Geoff
MemberHey 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 -
AuthorPosts
- The topic ‘Calendar Thinks it's Tomorrow Already’ is closed to new replies.
