Posted: April 14, 2016 at 2:10 am
|
I know there are several posts regarding incorrect timestamp on events. I understand there is another plugin that is causing my issue; however, not being too familiar with PHP, I’m not exactly sure how to fix it. I am using ajax event calendar, which is the culprit in my case. I searched in the edit area and came up this string of PHP code:
Is this the area that I would need to change coding? If so, can you tell me what should change and what I would replace it with? I can’t disable my calendar to use event registration, but also need my times to be correct. I have my WP time setting for USA – Denver, not UTC. Any help is greatly appreciated. Thanks! |
Hi Connie, Event Espresso stores date times as UTC and then uses the offset in the General Settings page to adjust to the local time zone. Using a city/region near you instead of a UTC option is recommended. If you are seeing strange issues with the date times, then something on your site may be incorrectly using date_default_timezone_set(). Here are some resources that talk about this: http://www.taupecat.com/2010/10/using-time-in-your-wordpress-plugin/ http://weston.ruter.net/2013/04/02/do-not-change-the-default-timezone-from-utc-in-wordpress/ I would try reaching out to the theme developer if you are using a commercial theme and share the resources above with them. Otherwise, try using current_time() instead of date_default_timezone_set(). — |
|
|
Hi Lorenzo – thanks for the response, but I don’t feel like you addressed my specific question. The issue is not a “theme” issue. As I stated in my first post, it is a plugin issue and I pasted the code I believe is the issue, but I am not familiar enough with code to simply say, “yes, this is the line I should adjust.” Is there any way possible, you can actually look at the code I pasted in the post and confirm/deny that to be the issue? And, if it is the issue, can you tell me what line I need to change and what the change should be. I appreciate the links, but they do me no good if I don’t know how to code PHP… Thanks! |
Hi Connie, I can’t confirm if making the change for the references from date_default_timezone_set() to current_time() will correct the issue sitewide from that specific section of code. Could you try reaching out the developer (author) and share the links that I shared with you? This looks like it may be the plugin as I see the name (Ajax Event Calendar) in the block of code that you shared so you could create a support post there to let the author know: https://wordpress.org/support/plugin/ajax-event-calendar The other thing is if the above is the actual plugin, then any edits to the code would be lost once you update the plugin so it would be preferred to have the author correct this on their end. Thanks — |
|
The support post ‘Incorrect Event Time’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.