Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Cache user timezones #161

Open
TimJentzsch opened this issue Jan 5, 2022 · 0 comments
Open

Cache user timezones #161

TimJentzsch opened this issue Jan 5, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@TimJentzsch
Copy link
Contributor

TimJentzsch commented Jan 5, 2022

We currently use the timezone of the user executing the command to calculate the localized data.
Instead, we should use the timezone of the user whose data is being shown.

To accomplish this, we need to cache the timezones.
Whenever a user executes a command or changes their nickname, their timezone should be extracted from their username and cached in a simple dict.
The extract_utc_offset function should then also take the username that the data is about and return their timezone.

This approach won't work across restarts, but I think that's fine.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant