aboutsummaryrefslogtreecommitdiff
path: root/app/views/configure/display.phtml
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/views/configure/display.phtml
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/views/configure/display.phtml')
-rw-r--r--app/views/configure/display.phtml19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml
index d49986981..0391e59b3 100644
--- a/app/views/configure/display.phtml
+++ b/app/views/configure/display.phtml
@@ -26,6 +26,25 @@
</div>
<div class="form-group">
+ <label class="group-name" for="language"><?= _t('conf.display.timezone') ?></label>
+ <div class="group-controls">
+ <select name="timezone" id="timezone" data-leave-validation="<?= FreshRSS_Context::$user_conf->timezone ?>">
+ <?php
+ $timezones = array_merge([''], DateTimeZone::listIdentifiers());
+ if (!in_array(FreshRSS_Context::$user_conf->timezone, $timezones, true)) {
+ FreshRSS_Context::$user_conf->timezone = '';
+ }
+ ?>
+ <?php foreach ($timezones as $timezone): ?>
+ <option value="<?= $timezone ?>"<?= FreshRSS_Context::$user_conf->timezone === $timezone ? ' selected="selected"' : '' ?>>
+ <?= $timezone == '' ? _t('gen.short.by_default') . ' (' . ini_get('date.timezone') . ')' : $timezone ?>
+ </option>
+ <?php endforeach; ?>
+ </select>
+ </div>
+ </div>
+
+ <div class="form-group">
<label class="group-name" for="theme"><?= _t('conf.display.theme') ?></label>
<div class="group-controls">
<ul class="slides">