Events Made Easy › Forums › How do I … › Bookings no longer allowed on this date – timezone change
- This topic has 8 replies, 3 voices, and was last updated 13 years, 10 months ago by Franky.
-
AuthorPosts
-
Fri 7 Jan 2011 at 21:00 #42382AnonymousInactive
Hi Franky,
My client’s wordpress was set by default to UTC, when it should be UTC-6. Thus he gets the message “Bookings no longer allowed on this date.” 6 hours early. I changed the timezone, and even cleared cache using w3 total cache, and disabled and re-enabled the events manager plugin, but the changes have not taken effect yet for some reason. I have also tried creating brand new events, same problem. I have also disabled w3 total cache to try it out. Any thoughts as to how to get the system updated?
Thanks
Fri 7 Jan 2011 at 21:22 #46018AnonymousInactiveFirst, try updating to 3.2.15. I had the same problem when I was using v3.1.12. There was apparenly an issue with defaulting to UTC time. A quick fix is to edit the file “eme_rsvp.php”. in the event plugin folder to account for the six hour difference.
Below is the line to change(line 29):
original
if (time()+$event*60*60*24 > $event_start_datetime ) {
changed
if (time()+$event*60*60*24-60*60*6 > $event_start_datetime ) {
At the time, I was using v3.2.12. When I updated to v3.2.15 and the timezone problem was fixed without the above correction.
Fri 7 Jan 2011 at 22:13 #46019FrankyKeymasterWeird that it would work in 3.2.15 then, I don’t remember changing anything in that area …
Mon 10 Jan 2011 at 19:28 #46020AnonymousInactiveSorry, I should have mentioned that I am already using 3.2.15. So I’m not sure why I’m having that issue. I did do the manual fix, thanks for the help! But I’m thinking that there will be a problem with it once we hit daylight savings time in the US. I’m not sure if this will change automatically otherwise or not. Any ideas as to why this isn’t working?
Thanks all.
Josh
Mon 10 Jan 2011 at 20:01 #46021AnonymousInactiveMy issue was fixed when in installed the latest plugin. It may have simply been re-activating the plugin that fixed it.
Mon 10 Jan 2011 at 23:06 #46022FrankyKeymasterCould you try by not doing that fix, but instead add these in events-manager.php around line 145 (just before all the includes):
$tzstring = get_option('timezone_string');
if (!empty($tzstring) ) {
@date_default_timezone_set ($tzstring);
}If that doesn’t work, use the same code in eme_rsvp.php, at the top of the functions eme_add_booking_form and eme_delete_booking_form, e.g. for eme_add_booking_form:
function eme_add_booking_form($event_id) {
global $form_add_message, $current_user;
$tzstring = get_option('timezone_string');
if (!empty($tzstring) ) {
@date_default_timezone_set ($tzstring);
}Tue 11 Jan 2011 at 20:27 #46023FrankyKeymasterI didn’t have any feedback on this, so I assume this works ok?
Wed 12 Jan 2011 at 18:20 #46024AnonymousInactiveFranky,
your first option worked like a charm! ( add these in events-manager.php around line 145 (just before all the includes):
$tzstring = get_option(‘timezone_string’);
if (!empty($tzstring) ) {
@date_default_timezone_set ($tzstring);
}
)
Thanks!
Wed 12 Jan 2011 at 19:35 #46025FrankyKeymasterNice to hear! It has been added to trunk.
-
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.