Adding times and timezone offset for EM

[ad_1]

Hi there! This may help folks needing to add times to startDate and endDate and also timezone offset to get accurate local times in Google events when using the plugin, Events Manager. There are some errors and omissions in this file regarding this. Here’s our updated code section in event-schema/includes/class-event-schema-em.php:

date_default_timezone_set('America/Toronto');
$time_zone_offset = date("P");
$start_datetime = $start_date.'T'.$start_time.$time_zone_offset;
$end_datetime = $end_date.'T'.$end_time.$time_zone_offset;
$centralize_event = array(
	"ID"         => $event_id,
	"name"       => $name,
	"description"=> $description,
	"url"        => $event_url,
	"start_date" => $start_datetime,
	"end_date"   => $end_datetime,
	"is_all_day" => $is_all_day,
	"image"      => $image_url,
);
  • This topic was modified 10 hours, 55 minutes ago by sevensoutbill.
  • This topic was modified 10 hours, 54 minutes ago by sevensoutbill.

 

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