How to change a specific Event’s timezone programmatically

Hello. I’m using the latest Events Manager version 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

Also, the documentation seems to be wrong:


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


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer