mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-03 14:09:23 +00:00
Set the same default timezone to Database and PHP
This commit is contained in:
parent
40ff70e11f
commit
86447e31fe
@ -65,11 +65,10 @@ register_shutdown_function('early_catch_fatal_error');
|
||||
|
||||
$c->default_timezone = ini_get ( 'date.timezone' );
|
||||
if (empty ( $c->default_timezone )) {
|
||||
$c->default_timezone = 'UTC';
|
||||
if (isset ( $_SERVER ['HTTP_X_DAVICAL_TESTCASE'] )) {
|
||||
$c->default_timezone = 'Pacific/Auckland';
|
||||
}
|
||||
$c->default_timezone = 'UTC';
|
||||
date_default_timezone_set ( 'UTC' );
|
||||
}
|
||||
|
||||
// Default some of the configurable values
|
||||
@ -259,6 +258,7 @@ if ( $qry->Exec('always',__LINE__,__FILE__) && $row = $qry->Fetch() ) {
|
||||
$qry->QDo('SET TIMEZONE TO ?', $c->default_timezone );
|
||||
}
|
||||
}
|
||||
date_default_timezone_set ( $c->default_timezone );
|
||||
|
||||
require_once('Principal.php');
|
||||
|
||||
|
||||
@ -65,11 +65,10 @@ register_shutdown_function('early_catch_fatal_error');
|
||||
|
||||
$c->default_timezone = ini_get ( 'date.timezone' );
|
||||
if (empty ( $c->default_timezone )) {
|
||||
$c->default_timezone = 'UTC';
|
||||
if (isset ( $_SERVER ['HTTP_X_DAVICAL_TESTCASE'] )) {
|
||||
$c->default_timezone = 'Pacific/Auckland';
|
||||
}
|
||||
$c->default_timezone = 'UTC';
|
||||
date_default_timezone_set ( 'UTC' );
|
||||
}
|
||||
|
||||
// Default some of the configurable values
|
||||
@ -259,6 +258,7 @@ if ( $qry->Exec('always',__LINE__,__FILE__) && $row = $qry->Fetch() ) {
|
||||
$qry->QDo('SET TIMEZONE TO ?', $c->default_timezone );
|
||||
}
|
||||
}
|
||||
date_default_timezone_set ( $c->default_timezone );
|
||||
|
||||
require_once('Principal.php');
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user