From 6261dc9cf41aaaa0eb2a05fbe81bc107ab91bbdd Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 29 Nov 2022 15:27:32 +0100 Subject: User-defined time zone (#4906) * User-defined time zone #fix https://github.com/FreshRSS/FreshRSS/issues/2754 * Update app/i18n/nl/conf.php Co-authored-by: Frans de Jonge * Timezone when creating a new user Co-authored-by: Frans de Jonge --- app/FreshRSS.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/FreshRSS.php') diff --git a/app/FreshRSS.php b/app/FreshRSS.php index 602c46658..02460af69 100644 --- a/app/FreshRSS.php +++ b/app/FreshRSS.php @@ -99,6 +99,9 @@ class FreshRSS extends Minz_FrontController { Minz_Session::_param('language', $language); Minz_Translate::init($language); + + $timezone = isset(FreshRSS_Context::$user_conf) ? FreshRSS_Context::$user_conf->timezone : ''; + date_default_timezone_set($timezone != '' ? $timezone : '' . ini_get('date.timezone')); } private static function getThemeFileUrl($theme_id, $filename) { -- cgit v1.2.3