diff options
author | Scott Ullrich <sullrich@gmail.com> | 2012-01-18 15:05:39 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@gmail.com> | 2012-01-18 15:05:39 -0500 |
commit | 943994ff7dd8854622fd1068ba198badb3bd8552 (patch) | |
tree | 8966d806fcd2bf9e494cbfa7c5330ba40c0cc716 | |
parent | 3133cc3bd775ee905adc2b6f8fcc74caab053d6d (diff) | |
download | pfsense-943994ff7dd8854622fd1068ba198badb3bd8552.zip pfsense-943994ff7dd8854622fd1068ba198badb3bd8552.tar.gz |
Ensure timezone is set
-rw-r--r-- | etc/inc/config.inc | 2 | ||||
-rw-r--r-- | etc/inc/system.inc | 3 | ||||
-rwxr-xr-x | usr/local/www/pkg_mgr.php | 6 | ||||
-rwxr-xr-x | usr/local/www/pkg_mgr_installed.php | 6 |
4 files changed, 15 insertions, 2 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc index 78163fe..a671212 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -221,4 +221,4 @@ if($config_parsed == true) { } } -?> +?>
\ No newline at end of file diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 8533310..b443e8a 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -1571,4 +1571,5 @@ function openntpd_get_listen_ips() { $listenips[] = $tmp; return $listenips; } -?> + +?>
\ No newline at end of file diff --git a/usr/local/www/pkg_mgr.php b/usr/local/www/pkg_mgr.php index 15097a6..16b3ca8 100755 --- a/usr/local/www/pkg_mgr.php +++ b/usr/local/www/pkg_mgr.php @@ -44,6 +44,12 @@ require_once("globals.inc"); require_once("guiconfig.inc"); require_once("pkg-utils.inc"); +$timezone = $syscfg['timezone']; +if (!$timezone) + $timezone = "Etc/UTC"; + +date_default_timezone_set($timezone); + /* if upgrade in progress, alert user */ if(is_subsystem_dirty('packagelock')) { $pgtitle = array(gettext("System"),gettext("Package Manager")); diff --git a/usr/local/www/pkg_mgr_installed.php b/usr/local/www/pkg_mgr_installed.php index 78a3362..0905701 100755 --- a/usr/local/www/pkg_mgr_installed.php +++ b/usr/local/www/pkg_mgr_installed.php @@ -40,6 +40,12 @@ require_once("guiconfig.inc"); require_once("pkg-utils.inc"); +$timezone = $syscfg['timezone']; +if (!$timezone) + $timezone = "Etc/UTC"; + +date_default_timezone_set($timezone); + /* if upgrade in progress, alert user */ if(is_subsystem_dirty('packagelock')) { $pgtitle = array(gettext("System"),gettext("Package Manager")); |