diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2010-08-02 00:00:09 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2010-08-02 00:02:12 -0400 |
commit | 34d70cc09a2f9868a33f75a19f25da1faf15392b (patch) | |
tree | b0b9ffbf9ba3d8e09b9a7a8789f61ae64161b117 | |
parent | 8b35aa779f17c034cb9a43fcbad8a2186f6966c9 (diff) | |
download | pfsense-34d70cc09a2f9868a33f75a19f25da1faf15392b.zip pfsense-34d70cc09a2f9868a33f75a19f25da1faf15392b.tar.gz |
Set the timezone if available. This will minimize calls to the system for tz data and should not have any negative side-effects.
-rw-r--r-- | etc/inc/config.inc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc index 68d3ec9..78c6b04 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -195,11 +195,15 @@ else if ($g['booting'] and !file_exists($g['cf_conf_path'] . "/config.xml") ) { mwexec("/sbin/mount -a"); } - - if($g['booting']) echo "."; $config = parse_config(); +/* set timezone */ +$timezone = $config['system']['timezone']; +if (!$timezone) + $timezone = "Etc/UTC"; +date_default_timezone_set("$timezone"); + if($config_parsed == true) { /* process packager manager custom rules */ if(is_dir("/usr/local/pkg/parse_config")) { |