mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-14 03:52:21 +03:00
Fix timezone issue with add-to-google link of the booking page (#1216)
This commit is contained in:
parent
18f15ea7d1
commit
49e2808b98
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