Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Generate timestamps independently from current locale #127

Merged
merged 3 commits into from
Apr 28, 2022

Conversation

marty-se
Copy link

@marty-se marty-se commented Apr 26, 2022

Inspired by wsgiref.handlers.format_date_time().

Fixes #122

Inspired by wsgiref.handlers.format_date_time()
@marty-se marty-se force-pushed the fix/locale-independent-timestamp branch from 2b6317d to 96bf825 Compare April 26, 2022 07:04
Comment on lines 207 to 208
weekday_names = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
month_names = [
Copy link
Member

Choose a reason for hiding this comment

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

Let's put that on top of the file as constant kinda WEEKDAY_NAMES and MONTH_NAMES

Copy link
Author

Choose a reason for hiding this comment

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

Sure, fixed.

@pvizeli
Copy link
Member

pvizeli commented Apr 28, 2022

Thanks

@pvizeli pvizeli merged commit 085bfd1 into NabuCasa:master Apr 28, 2022
@marty-se marty-se deleted the fix/locale-independent-timestamp branch April 29, 2022 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Signing in fails if locale.LC_TIME is set to a non-English language
2 participants