aboutsummaryrefslogtreecommitdiff
path: root/app/FreshRSS.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-11-29 15:27:32 +0100
committerGravatar GitHub <noreply@github.com> 2022-11-29 15:27:32 +0100
commit6261dc9cf41aaaa0eb2a05fbe81bc107ab91bbdd (patch)
treec578b84508173d4750c226fecca91082448fca31 /app/FreshRSS.php
parent60d626030d1c3fc5ee42ddabd379318509ccc154 (diff)
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 <fransdejonge@gmail.com> * Timezone when creating a new user Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Diffstat (limited to 'app/FreshRSS.php')
-rw-r--r--app/FreshRSS.php3
1 files changed, 3 insertions, 0 deletions
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) {