diff options
Diffstat (limited to 'include/cli_startup.php')
-rw-r--r-- | include/cli_startup.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/cli_startup.php b/include/cli_startup.php index 6bd4e7520..027d62953 100644 --- a/include/cli_startup.php +++ b/include/cli_startup.php @@ -6,7 +6,7 @@ require_once('boot.php'); function cli_startup() { - global $a, $db; + global $a, $db, $default_timezone; if(is_null($a)) { $a = new App; @@ -14,9 +14,13 @@ function cli_startup() { if(is_null($db)) { @include(".htconfig.php"); + + $a->timezone = ((x($default_timezone)) ? $default_timezone : 'UTC'); + date_default_timezone_set($a->timezone); + require_once('include/dba/dba_driver.php'); - $db = dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data); - unset($db_host, $db_port, $db_user, $db_pass, $db_data); + $db = dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type); + unset($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type); }; require_once('include/session.php'); |