From 16afec30392a2268adfc3c68bbde837e152e2f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9drix?= Date: Fri, 15 May 2026 09:40:10 +0200 Subject: [PATCH] =?UTF-8?q?fix=20:=20APP=5FTIMEZONE=20configurable=20(d?= =?UTF-8?q?=C3=A9faut=20Europe/Paris),=20FOLIO=5FREPO=5FURL=20dans=20.env.?= =?UTF-8?q?example?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- .env.example | 7 +++++++ bootstrap.php | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/.env.example b/.env.example index 478ec7b..bfab55f 100644 --- a/.env.example +++ b/.env.example @@ -6,6 +6,7 @@ APP_URL=https://example.com APP_ENV=prod APP_DEBUG=0 +APP_TIMEZONE=Europe/Paris # Authentification admin (email de l'administrateur principal) ADMIN_EMAIL= @@ -40,6 +41,12 @@ SMTP_FROM_NAME= CONTACT_EMAIL= CONTACT_FROM_EMAIL= +# Dépôt Folio pour le vérificateur de mises à jour (UpdateChecker) +# URL de base du dépôt Gitea (sans slash final) +FOLIO_REPO_URL=https://git.abonnel.fr/cedricAbonnel/folio +# Branche suivie pour les mises à jour (défaut : main) +# FOLIO_UPDATE_BRANCH=main + # Chemin absolu vers le répertoire des articles (data/) # Par défaut : BASE_PATH/data (dans le répertoire de l'application) # Recommandé en production : chemin hors du répertoire web, ex. /srv/data/folio diff --git a/bootstrap.php b/bootstrap.php index adc19e1..66bc054 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -6,6 +6,10 @@ if (!defined('BASE_PATH')) { define('BASE_PATH', __DIR__); } +$__tz = $_ENV['APP_TIMEZONE'] ?? getenv('APP_TIMEZONE') ?: 'Europe/Paris'; +date_default_timezone_set($__tz); +unset($__tz); + if (!defined('DATA_PATH')) { $__dataPath = $_ENV['DATA_PATH'] ?? getenv('DATA_PATH') ?: ''; define('DATA_PATH', $__dataPath !== '' ? rtrim($__dataPath, '/') : BASE_PATH . '/data');