Events Made Easy Forums How do I … Bookings no longer allowed on this date – timezone change

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #42382
    Anonymous
    Inactive

    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

    #46018
    Anonymous
    Inactive

    First, 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.

    #46019
    Franky
    Keymaster

    Weird that it would work in 3.2.15 then, I don’t remember changing anything in that area …

    #46020
    Anonymous
    Inactive

    Sorry, 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

    #46021
    Anonymous
    Inactive

    My issue was fixed when in installed the latest plugin. It may have simply been re-activating the plugin that fixed it.

    #46022
    Franky
    Keymaster

    Could 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);
    }

    #46023
    Franky
    Keymaster

    I didn’t have any feedback on this, so I assume this works ok?

    #46024
    Anonymous
    Inactive

    Franky,

    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!

    #46025
    Franky
    Keymaster

    Nice to hear! It has been added to trunk.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top