Use the time_format default setting on more pages (#7663)

* Use the time_format default setting on more pages

* Update call_recordings.php

* Update devices.php

* Update email_queue.php

* Update emergency.php

* Update time formatting based on settings

* Update fax_logs.php

* Update fax_queue.php

* Update time_condition_edit.php

* Update xml_cdr_details.php

* Update xml_cdr_search.php

* Update xml_cdr_statistics_inc.php

* Update xml_cdr_statistics.php

* Update xml_cdr.php

* Update contact_edit.php

* Update contact_notes_view.php

* Update contact_notes.php

* Update contact_timer.php

* Update contact_times.php

* Update user_logs.php

* Update footer.php

* Update template.php

* Update fax_files.php

* Update recent_calls.php

* Update missed_calls.php

* Update recordings.php

* Update xml_cdr_statistics_inc.php

* Update xml_cdr_inc.php

* Update xml_cdr_inc.php

* Update recordings.php

* Update missed_calls.php

* Update call_block.php

* Update user_logs.php

* Update xml_cdr_inc.php

* Update xml_cdr_details.php

* Update recordings.php

* Update fax_queue.php

* Update fax_logs.php

* Update fax_files.php

* Update event_guard_logs.php

* Update emergency.php

* Update email_queue.php

* Update devices.php

* Update call_recordings.php

* Update time_condition_edit.php

* Update time_condition_edit.php

* Update call_block.php

* Update call_recordings.php

* Update devices.php

* Update email_queue.php

* Update emergency.php

* Update event_guard_logs.php

* Update fax_files.php

* Update fax_logs.php

* Update fax_queue.php

* Update recordings.php

* Update xml_cdr_inc.php

* Update user_logs.php

* Update destination_summary.php

* Update xml_cdr_extension_summary.php

* Update music_on_hold.php

* Update fax_send.php

* Update voicemail_greetings.php

* Update voicemail_greetings.php

* Update xml_cdr_inc.php

* Update xml_cdr_inc.php

* Update xml_cdr_inc.php

* Update xml_cdr_statistics_inc.php

* Update xml_cdr_statistics_inc.php

* Update xml_cdr_inc.php

* Update xml_cdr_extension_summary.php

* Update destination_summary.php

* Update xml_cdr_statistics_inc.php

* Update xml_cdr_inc.php

* Update xml_cdr_statistics_inc.php

* Update contact_edit.php

* Update css.php

* Update template.php

* Update fax_send.php
This commit is contained in:
Alex
2025-12-18 09:52:49 -07:00
committed by GitHub
parent 5ee6b1b0e9
commit 72dafd903d
33 changed files with 430 additions and 184 deletions

View File

@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2018-2024
Portions created by the Initial Developer are Copyright (C) 2018-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -244,16 +244,10 @@
//set the time zone
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
$parameters['time_zone'] = $time_zone;
//set the time format options: 12h, 24h
if (!empty($settings->get('domain', 'time_format'))) {
if ($settings->get('domain', 'time_format') == '12h') {
$time_format = 'HH12:MI:SS am';
}
elseif ($settings->get('domain', 'time_format') == '24h') {
$time_format = 'HH24:MI:SS';
}
if ($settings->get('domain', 'time_format') == '24h') {
$time_format = 'HH24:MI:SS';
}
else {
$time_format = 'HH12:MI:SS am';
@@ -279,6 +273,7 @@
$parameters['domain_uuid'] = $domain_uuid;
$sql .= order_by($order_by, $order, 'fax_date', 'desc');
$sql .= limit_offset($rows_per_page, $offset);
$parameters['time_zone'] = $time_zone;
$fax_files = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);

View File

@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2024
Portions created by the Initial Developer are Copyright (C) 2008-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -81,7 +81,7 @@
$parameters['search'] = '%'.$search.'%';
}
//prepare to page the results
//get the count
$sql = "select count(fax_log_uuid) from v_fax_logs ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and fax_uuid = :fax_uuid ";
@@ -104,14 +104,19 @@
//set the time zone
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
//set time format
$time_format = $settings->get('domain', 'time_format');
//set the time format options: 12h, 24h
if ($settings->get('domain', 'time_format') == '24h') {
$time_format = 'HH24:MI:SS';
}
else {
$time_format = 'HH12:MI:SS am';
}
//get the list
$sql = "select ";
$sql .= " fax_epoch, ";
$sql .= " to_char(timezone(:time_zone, to_timestamp(fax_epoch)), 'DD Mon YYYY') as fax_date_formatted, \n";
$sql .= " to_char(timezone(:time_zone, to_timestamp(fax_epoch)), 'HH12:MI:SS am') as fax_time_formatted, \n";
$sql .= " to_char(timezone(:time_zone, to_timestamp(fax_epoch)), '".$time_format."') as fax_time_formatted, \n";
$sql .= " fax_success, ";
$sql .= " fax_result_code, ";
$sql .= " fax_result_text, ";

View File

@@ -518,7 +518,13 @@ if (!function_exists('fax_split_dtmf')) {
$pdf->SetXY($x + 2.0, $y + 1.65);
if (defined('STDIN') || (!empty($_REQUEST['submit']) && $_REQUEST['submit'] != 'preview')) {
$date = new DateTime('now', new DateTimeZone( $settings->get('domain','time_zone', date_default_timezone_get() ) ));
$pdf->Write(0.3, $date->format('d M Y @ h:i:s A'));
if ($settings->get('domain', 'time_format') == '24h') {
$time_format = 'H:i:s';
}
else {
$time_format = 'h:i:s A';
}
$pdf->Write(0.3, $date->format('d M Y @ '.$time_format));
}
$pdf->SetXY($x + 2.0, $y + 1.95);
if (!empty($fax_recipient)) {