Skip to content

User-defined time zone#4906

Merged
Alkarex merged 3 commits intoFreshRSS:edgefrom
Alkarex:user-timezone
Nov 29, 2022
Merged

User-defined time zone#4906
Alkarex merged 3 commits intoFreshRSS:edgefrom
Alkarex:user-timezone

Conversation

@Alkarex
Copy link
Member

@Alkarex Alkarex commented Nov 28, 2022

#fix #2754

Default is server / PHP default, e.g. as defined by TZ in our Docker images, or in php.ini date.timezone

image

@Alkarex Alkarex added the I18n 🌍 Translations label Nov 28, 2022
@Alkarex Alkarex added this to the 1.21.0 milestone Nov 28, 2022
Copy link
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks straightforward, can't think of any negatives.

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
@aledeg
Copy link
Member

aledeg commented Nov 29, 2022

Correct me if I'm wrong, but for what I can gather from the code, there is no use of the timezone elsewhere than in the configuration. Do you plan on adding some code to utilize it in the interface or am I missing something?

@Alkarex
Copy link
Member Author

Alkarex commented Nov 29, 2022

Correct me if I'm wrong, but for what I can gather from the code, there is no use of the timezone elsewhere than in the configuration. Do you plan on adding some code to utilize it in the interface or am I missing something?

See the date_default_timezone_set() line for the actual use. It changes the time representations in the UI

@Alkarex
Copy link
Member Author

Alkarex commented Nov 29, 2022

I have just added the possibility to pick the timezone when creating a new user:

image

@Alkarex Alkarex merged commit 6261dc9 into FreshRSS:edge Nov 29, 2022
@Alkarex Alkarex deleted the user-timezone branch November 29, 2022 14:27
@Alwaysin
Copy link
Contributor

@Alkarex I think this PR led to a notice in PHP at each page load:

AH01071: Got error 'PHP message: PHP Notice:  date_default_timezone_set(): Timezone ID '' is invalid in /var/www/html/freshrss/app/FreshRSS.php on line 104'

Is this normal? I guess I just have to set a timezone in my PHP conf which has none by default, or select one in FreshRSS conf?

Alkarex added a commit to Alkarex/FreshRSS that referenced this pull request Jan 18, 2023
Add missing tzdata in Docker :newest
Fallback to UTC if no timezone is defined at all
#fix FreshRSS#4906 (comment)
@Alkarex Alkarex mentioned this pull request Jan 18, 2023
@Alkarex
Copy link
Member Author

Alkarex commented Jan 18, 2023

@Alwaysin Please try #5021

Alkarex added a commit that referenced this pull request Jan 19, 2023
* Safer timezone set
Add missing tzdata in Docker :newest
Fallback to UTC if no timezone is defined at all
#fix #4906 (comment)

* Better refactoring
Show fallback timezone everywhere
cjchung pushed a commit to cjchung/FreshRSS that referenced this pull request Jan 20, 2023
* Safer timezone set
Add missing tzdata in Docker :newest
Fallback to UTC if no timezone is defined at all
#fix FreshRSS#4906 (comment)

* Better refactoring
Show fallback timezone everywhere
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

I18n 🌍 Translations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Time zone options for each user

4 participants