Fix timezone issue with add-to-google link of the booking page (#1216)
This commit is contained in:
parent
9fbe6c6b8b
commit
dce26bafe0
1 changed files with 10 additions and 2 deletions
|
@ -336,9 +336,17 @@ class Appointments extends EA_Controller {
|
||||||
|
|
||||||
$company_name = $this->settings_model->get_setting('company_name');
|
$company_name = $this->settings_model->get_setting('company_name');
|
||||||
|
|
||||||
$appointment_start_instance = new DateTime($appointment['start_datetime']);
|
$provider_timezone_instance = new DateTimeZone($provider['timezone']);
|
||||||
|
|
||||||
$appointment_end_instance = new DateTime($appointment['end_datetime']);
|
$utc_timezone_instance = new DateTimeZone('UTC');
|
||||||
|
|
||||||
|
$appointment_start_instance = new DateTime($appointment['start_datetime'], $provider_timezone_instance);
|
||||||
|
|
||||||
|
$appointment_start_instance->setTimezone($utc_timezone_instance);
|
||||||
|
|
||||||
|
$appointment_end_instance = new DateTime($appointment['end_datetime'], $provider_timezone_instance);
|
||||||
|
|
||||||
|
$appointment_end_instance->setTimezone($utc_timezone_instance);
|
||||||
|
|
||||||
$add_to_google_url_params = [
|
$add_to_google_url_params = [
|
||||||
'action' => 'TEMPLATE',
|
'action' => 'TEMPLATE',
|
||||||
|
|
Loading…
Reference in a new issue