make sure default timezone is set in external processes
This commit is contained in:
parent
24e85c95b6
commit
30295926b9
7
boot.php
7
boot.php
|
@ -4,6 +4,7 @@ require_once('include/config.php');
|
||||||
require_once('include/network.php');
|
require_once('include/network.php');
|
||||||
require_once('include/plugin.php');
|
require_once('include/plugin.php');
|
||||||
require_once('include/text.php');
|
require_once('include/text.php');
|
||||||
|
require_once('include/datetime.php');
|
||||||
require_once('include/pgettext.php');
|
require_once('include/pgettext.php');
|
||||||
require_once('include/nav.php');
|
require_once('include/nav.php');
|
||||||
require_once('include/cache.php');
|
require_once('include/cache.php');
|
||||||
|
@ -333,6 +334,12 @@ if(! class_exists('App')) {
|
||||||
|
|
||||||
function __construct() {
|
function __construct() {
|
||||||
|
|
||||||
|
global $default_timezone;
|
||||||
|
|
||||||
|
$this->timezone = ((x($default_timezone)) ? $default_timezone : 'UTC');
|
||||||
|
|
||||||
|
date_default_timezone_set($this->timezone);
|
||||||
|
|
||||||
$this->config = array();
|
$this->config = array();
|
||||||
$this->page = array();
|
$this->page = array();
|
||||||
$this->pager= array();
|
$this->pager= array();
|
||||||
|
|
|
@ -59,8 +59,7 @@ if(! $install) {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Important stuff we always need to do.
|
* Important stuff we always need to do.
|
||||||
* Initialise authentication and date and time.
|
*
|
||||||
* Create the HTML head for the page, even if we may not use it (xml, etc.)
|
|
||||||
* The order of these may be important so use caution if you think they're all
|
* The order of these may be important so use caution if you think they're all
|
||||||
* intertwingled with no logical order and decide to sort it out. Some of the
|
* intertwingled with no logical order and decide to sort it out. Some of the
|
||||||
* dependencies have changed, but at least at one time in the recent past - the
|
* dependencies have changed, but at least at one time in the recent past - the
|
||||||
|
@ -68,12 +67,6 @@ if(! $install) {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once("datetime.php");
|
|
||||||
|
|
||||||
$a->timezone = (($default_timezone) ? $default_timezone : 'UTC');
|
|
||||||
|
|
||||||
date_default_timezone_set($a->timezone);
|
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -67,7 +67,7 @@ function profile_init(&$a) {
|
||||||
|
|
||||||
function profile_content(&$a, $update = 0) {
|
function profile_content(&$a, $update = 0) {
|
||||||
|
|
||||||
$category = datequery = $datequery2 = '';
|
$category = $datequery = $datequery2 = '';
|
||||||
|
|
||||||
if($a->argc > 2) {
|
if($a->argc > 2) {
|
||||||
for($x = 2; $x < $a->argc; $x ++) {
|
for($x = 2; $x < $a->argc; $x ++) {
|
||||||
|
|
Loading…
Reference in a new issue