summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_dhcpv6_leases.php
diff options
context:
space:
mode:
authorJoecowboy <i7wasn7m3@gmail.com>2012-02-25 18:58:36 -0600
committerJoecowboy <i7wasn7m3@gmail.com>2012-02-25 18:58:36 -0600
commitee0f23b4fda71e60d5d2959a9ac484b78799eeec (patch)
treed4dcf5a2db8e44a0a4bcefd12277628ba8577f8b /usr/local/www/status_dhcpv6_leases.php
parente085eba5898fa6f351d2b07ed30acece9de8bfc3 (diff)
downloadpfsense-ee0f23b4fda71e60d5d2959a9ac484b78799eeec.zip
pfsense-ee0f23b4fda71e60d5d2959a9ac484b78799eeec.tar.gz
I now parses the xml tags in the dhcpdv6 to check if an interface for DHCPv6 lease is using local time if not defaults to UTC time.
Diffstat (limited to 'usr/local/www/status_dhcpv6_leases.php')
-rw-r--r--usr/local/www/status_dhcpv6_leases.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/usr/local/www/status_dhcpv6_leases.php b/usr/local/www/status_dhcpv6_leases.php
index c4d7aa7..2f2696d 100644
--- a/usr/local/www/status_dhcpv6_leases.php
+++ b/usr/local/www/status_dhcpv6_leases.php
@@ -96,12 +96,16 @@ function leasecmp($a, $b) {
}
function adjust_gmt($dt) {
- global $config;
- $sysctl = $config['system'];
- $timezone = $sysctl['timezone'];
- $timeformatchangev6 = $sysctl['timeformatchangev6'];
+ global $config;
+ $dhcpdv6 = $config['dhcpdv6'];
+ foreach ($dhcpdv6 as $dhcpv6leaseinlocaltime) {
+ $dhcpv6leaseinlocaltime = $dhcpv6leaseinlocaltime['dhcpv6leaseinlocaltime'];
+ if ($dhcpv6leaseinlocaltime == "yes")
+ break;
+ }
+ $timezone = $config['system']['timezone'];
$ts = strtotime($dt . " GMT");
- if ($timeformatchangev6 == "yes") {
+ if ($dhcpv6leaseinlocaltime == "yes") {
$this_tz = new DateTimeZone($timezone);
$dhcp_lt = new DateTime(strftime("%I:%M:%S%p", $ts), $this_tz);
$offset = $this_tz->getOffset($dhcp_lt);
OpenPOWER on IntegriCloud