From d368a78a7f7876d1cc77ede78c416cc3c58fbeaa Mon Sep 17 00:00:00 2001 From: Lukas Bernhard Date: Fri, 1 Nov 2024 10:20:09 +0100 Subject: [PATCH] try LC_ALL --- schafkopf/core/bitpoll.py | 2 +- schafkopf/core/gmail.py | 2 +- schafkopf/scheduler/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/schafkopf/core/bitpoll.py b/schafkopf/core/bitpoll.py index 09cad0f..5788538 100644 --- a/schafkopf/core/bitpoll.py +++ b/schafkopf/core/bitpoll.py @@ -20,7 +20,7 @@ class VoteDate(BaseModel): @staticmethod def from_bitpoll_date(date: str) -> "VoteDate": - locale.setlocale(locale.LC_TIME, 'de_DE') + locale.setlocale(locale.LC_ALL, 'de_DE') date = datetime.strptime(date, "%a, %d. %b. %Y") date = date.replace(hour=18, minute=30) return VoteDate( diff --git a/schafkopf/core/gmail.py b/schafkopf/core/gmail.py index 3477ff9..71b3c01 100644 --- a/schafkopf/core/gmail.py +++ b/schafkopf/core/gmail.py @@ -86,7 +86,7 @@ def create_calendar_entry(start: datetime, end: datetime, summary: str) -> MIMEB def format_datetime(dt: datetime): - locale.setlocale(locale.LC_TIME, 'en_US.UTF-8') + locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') weekday_name = dt.strftime('%A') month_name = dt.strftime('%B') day = dt.day diff --git a/schafkopf/scheduler/Dockerfile b/schafkopf/scheduler/Dockerfile index c4fa0a2..c4e31c6 100644 --- a/schafkopf/scheduler/Dockerfile +++ b/schafkopf/scheduler/Dockerfile @@ -14,7 +14,7 @@ RUN apt-get update && \ # Set locale environment variables ENV LANG=de_DE.UTF-8 \ - LC_TIME=de_DE.UTF-8 \ + LC_ALL=de_DE.UTF-8 \ LANGUAGE=de_DE.UTF-8 ENV PYTHONPATH="/app"