From 4e5477eace9aa5f00c53ff62ca3e35e38177bb09 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Tue, 26 Jul 2016 14:28:24 +0930 Subject: Display local DHCP lease times in 24-hour clock It seems odd to me that when the times are displayed in UTC they have 24-hour clock, but when displayed in local time they are formatted with 12-our clock and AM/PM. 24-hour format takes less screen space, and I would have thought that network admins would prefer working consistently in 24-hour clock format. (cherry picked from commit ede534659ca54d2268ce51ec2f9e15f77051a60c) --- src/usr/local/www/status_dhcp_leases.php | 2 +- src/usr/local/www/status_dhcpv6_leases.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/status_dhcp_leases.php b/src/usr/local/www/status_dhcp_leases.php index 3b358ba..fb2508a 100644 --- a/src/usr/local/www/status_dhcp_leases.php +++ b/src/usr/local/www/status_dhcp_leases.php @@ -124,7 +124,7 @@ function adjust_gmt($dt) { if ($dhcpleaseinlocaltime == "yes") { $ts = strtotime($dt . " GMT"); if ($ts !== false) { - return strftime("%Y/%m/%d %I:%M:%S%p", $ts); + return strftime("%Y/%m/%d %H:%M:%S", $ts); } } /* If we did not need to convert to local time or the conversion failed, just return the input. */ diff --git a/src/usr/local/www/status_dhcpv6_leases.php b/src/usr/local/www/status_dhcpv6_leases.php index a8b644a..2859ba6 100644 --- a/src/usr/local/www/status_dhcpv6_leases.php +++ b/src/usr/local/www/status_dhcpv6_leases.php @@ -132,7 +132,7 @@ function adjust_gmt($dt) { if ($dhcpv6leaseinlocaltime == "yes") { $ts = strtotime($dt . " GMT"); if ($ts !== false) { - return strftime("%Y/%m/%d %I:%M:%S%p", $ts); + return strftime("%Y/%m/%d %H:%M:%S", $ts); } } /* If we did not need to convert to local time or the conversion failed, just return the input. */ -- cgit v1.1