Skip to content

Commit

Permalink
Display local DHCP lease times in 24-hour clock
Browse files Browse the repository at this point in the history
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 ede5346)
  • Loading branch information
Phil Davis authored and sbeaver-netgate committed Aug 3, 2016
1 parent 4de9a6f commit 4e5477e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/usr/local/www/status_dhcp_leases.php
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion src/usr/local/www/status_dhcpv6_leases.php
Expand Up @@ -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. */
Expand Down

0 comments on commit 4e5477e

Please sign in to comment.