timezone support/config added, fixed #102

This commit is contained in:
Milos Stojanovic
2020-07-18 18:23:05 +02:00
parent 4f6b55675f
commit a2566561b3
4 changed files with 7 additions and 0 deletions

View File

@@ -4,6 +4,8 @@
* disabling axios response auto-transformation when editing content, fixes #110
* config params: .json and .md extensions added as 'editable' by default
* config params: timezone support added, mostly for accurate logging, defaults to UTC
* fixes #102
## 7.4.2 - 2020-07-18

View File

@@ -17,6 +17,9 @@ class Config
public function __construct(array $config = [])
{
$this->config = $config;
$timezone = isset($this->config['timezone']) ? $this->config['timezone'] : 'UTC';
date_default_timezone_set($timezone);
}
public function get($key = null, $default = null)

View File

@@ -4,6 +4,7 @@ return [
'public_path' => APP_PUBLIC_PATH,
'public_dir' => APP_PUBLIC_DIR,
'overwrite_on_upload' => false,
'timezone' => 'UTC', // https://www.php.net/manual/en/timezones.php
'frontend_config' => [
'app_name' => 'FileGator',

View File

@@ -4,6 +4,7 @@ return [
'public_path' => '',
'public_dir' => __DIR__.'/../../dist',
'overwrite_on_upload' => false,
'timezone' => 'UTC', // https://www.php.net/manual/en/timezones.php
'frontend_config' => [
'app_name' => 'FileGator',