supermathie
(Michael Brown)
10 באפריל, 2024, 9:03pm
1
If a user’s timezone is invalid, at least one sidekiq job throws an exception rather than falling back to a reasonable default:
In this case the user’s timezone was set to ""
(empty string).
We shouldn’t allow this to happen in the first place, and if it does, pick a reasonable fallback (UTC).
3 לייקים
pmusaraj
(Penar Musaraj)
11 באפריל, 2024, 4:58pm
6
We were accounting for nil
timezones in these emails but not for ""
values.
There’s an issue somewhere else with this instance that has timezones for the users set to ""
, that said, we should make sure emails don’t fail on an invalid timezone.
Added a PR for that here: FIX: Ensure invalid timezone does not block critical emails by pmusaraj · Pull Request #26607 · discourse/discourse · GitHub
supermathie
(Michael Brown)
11 באפריל, 2024, 5:01pm
7
also meta:
[1] pry(main)> UserOption.where(timezone: '').count
=> 17
and (another site):
[1] pry(main)> UserOption.where(timezone: '').count
=> 6