mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-24 22:46:08 +02:00
Add ability to set Timezone in config
This commit is contained in:
committed by
Chris Kankiewicz
parent
5604666253
commit
2bac42522d
@@ -14,5 +14,6 @@ HIDE_APP_FILES=true
|
||||
HIDE_VCS_FILES=true
|
||||
|
||||
DATE_FORMAT="Y-m-d H:i:s"
|
||||
TIMEZONE="UTC"
|
||||
|
||||
MAX_HASH_SIZE=1000000000
|
||||
|
@@ -119,6 +119,14 @@ return [
|
||||
*/
|
||||
'date_format' => Helpers::env('DATE_FORMAT', 'Y-m-d H:i:s'),
|
||||
|
||||
/**
|
||||
* Default timezone. For a list of supported timezones see:
|
||||
* https://www.php.net/manual/en/timezones.php
|
||||
*
|
||||
* Default value: 'UTC'
|
||||
*/
|
||||
'timezone' => Helpers::env('TIMEZONE', 'UTC'),
|
||||
|
||||
/**
|
||||
* The maximum file size (in bytes) that can be hashed. This helps to
|
||||
* prevent timeouts for excessively large files.
|
||||
|
@@ -66,6 +66,10 @@ class TwigFactory
|
||||
$this->container->get('date_format'), '%d days'
|
||||
);
|
||||
|
||||
$twig->getEnvironment()->getExtension(CoreExtension::class)->setTimezone(
|
||||
$this->container->get('timezone')
|
||||
);
|
||||
|
||||
foreach (self::VIEW_FUNCTIONS as $function) {
|
||||
$function = $this->callableResolver->resolve($function);
|
||||
|
||||
|
Reference in New Issue
Block a user