• Resolved louis7777

    (@louis7777)


    Hello. I’m using the latest Events Manager version 6.4.6.4. I’m trying to change the timezone of a newly-created Event using code, but it won’t override the default timezone (which is set at the General Options).

    $EM_Event = em_get_event($post_id, 'post_id');
    
    // e.g. default timezone is 'Europe/Madrid' and will try to change it to 'Pacific/Pitcairn' for this Event
    $EM_Event->set_timezone('Pacific/Pitcairn');

    Also, the documentation seems to be wrong:

    $EM_Event->setTimezone('Europe/Madrid');

    The setTimezone() function does not exist for that class.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to change a specific Event’s timezone programmatically’ is closed to new replies.