diff options
author | Joecowboy <i7wasn7m3@gmail.com> | 2012-02-25 18:58:36 -0600 |
---|---|---|
committer | Joecowboy <i7wasn7m3@gmail.com> | 2012-02-25 18:58:36 -0600 |
commit | ee0f23b4fda71e60d5d2959a9ac484b78799eeec (patch) | |
tree | d4dcf5a2db8e44a0a4bcefd12277628ba8577f8b /usr | |
parent | e085eba5898fa6f351d2b07ed30acece9de8bfc3 (diff) | |
download | pfsense-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')
-rw-r--r-- | usr/local/www/status_dhcpv6_leases.php | 14 |
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); |