diff --git a/.env.docker.example b/.env.docker.example index 58d3404..537fb3c 100644 --- a/.env.docker.example +++ b/.env.docker.example @@ -6,6 +6,7 @@ SERVER_ADDRESS=0.0.0.0 SERVER_PORT=9503 MEMORY_LIMIT=256M +TIMEZONE=UTC # List of allowed clients. Separate with comma. # Leave blanc, to allow requests from all IP (dangerous!) diff --git a/.env.example b/.env.example index cba06b3..2f3c343 100644 --- a/.env.example +++ b/.env.example @@ -6,6 +6,7 @@ SERVER_ADDRESS=127.0.0.1 SERVER_PORT=9503 MEMORY_LIMIT=256M +TIMEZONE=UTC # List of allowed clients. Separate with comma. # Leave blanc, to allow requests from all IP (dangerous!) diff --git a/bootstrap.php b/bootstrap.php index de960cb..15eeeea 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -49,11 +49,14 @@ } } -$memoryLimit = getenv('MEMORY_LIMIT'); -if ($memoryLimit !== false) { +if ($memoryLimit = getenv('MEMORY_LIMIT')) { ini_set('memory_limit', $memoryLimit); } +if ($timezone = getenv('TIMEZONE')) { + date_default_timezone_set($timezone); +} + if (!function_exists('debug')) { function debug(string $message, array $context) { Logger::getInstance()->debug($message, $context);