From 6858d120f6ec3401accc43e8f153ed35c57a7e9e Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Sun, 29 Mar 2020 16:23:53 +0200 Subject: [PATCH] The emails display the provider timezone. --- application/views/emails/appointment_details.php | 4 ++++ application/views/emails/delete_appointment.php | 4 ++++ engine/Notifications/Email.php | 14 ++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/application/views/emails/appointment_details.php b/application/views/emails/appointment_details.php index b4f6594b..81a655f0 100644 --- a/application/views/emails/appointment_details.php +++ b/application/views/emails/appointment_details.php @@ -33,6 +33,10 @@ + + + +

diff --git a/application/views/emails/delete_appointment.php b/application/views/emails/delete_appointment.php index 192fa334..8ebff00a 100644 --- a/application/views/emails/delete_appointment.php +++ b/application/views/emails/delete_appointment.php @@ -33,6 +33,10 @@ + + + +

diff --git a/engine/Notifications/Email.php b/engine/Notifications/Email.php index f2dc71b1..b83eeeda 100755 --- a/engine/Notifications/Email.php +++ b/engine/Notifications/Email.php @@ -83,6 +83,12 @@ class Email { EmailAddress $recipientEmail, Text $icsStream ) { + $framework = get_instance(); + + $framework->load->model('timezones_model'); + + $timezones = $framework->timezones_model->to_array(); + switch ($company['date_format']) { case 'DMY': @@ -117,6 +123,7 @@ class Email { $appointment_provider = $provider['first_name'] . ' ' . $provider['last_name']; $appointment_start_date = date($date_format . ' ' . $timeFormat, strtotime($appointment['start_datetime'])); $appointment_end_date = date($date_format . ' ' . $timeFormat, strtotime($appointment['end_datetime'])); + $appointment_timezone = $timezones[$provider['timezone']]; $appointment_link = $appointmentLink->get(); $company_link = $company['company_link']; $company_name = $company['company_name']; @@ -171,6 +178,12 @@ class Email { EmailAddress $recipientEmail, Text $reason ) { + $framework = get_instance(); + + $framework->load->model('timezones_model'); + + $timezones = $framework->timezones_model->to_array(); + switch ($company['date_format']) { case 'DMY': @@ -203,6 +216,7 @@ class Email { $appointment_provider = $provider['first_name'] . ' ' . $provider['last_name']; $appointment_date = date($date_format . ' ' . $timeFormat, strtotime($appointment['start_datetime'])); $appointment_duration = $service['duration'] . ' ' . $this->framework->lang->line('minutes'); + $appointment_timezone = $timezones[$provider['timezone']]; $company_link = $company['company_link']; $company_name = $company['company_name']; $customer_name = $customer['first_name'] . ' ' . $customer['last_name'];