Add timezone support

This commit is contained in:
blankhex committed 2026-10-24 20:36:47 +03:00
1 parent fffc1b0c81
commit a07943e645
8 files changed
+90 -6

No files matched your search

+3 -1
View File
@@ -109,7 +109,9 @@ class MeetingsBot:
return meeting.scheduled_at < datetime.now(timezone.utc) - STALE_MEETING_GRACE
def _announce(self, meeting: Meeting) -> bool:
text = format_new_meeting(meeting, web_base_url=self.cfg.api_base_url)
text = format_new_meeting(
meeting, web_base_url=self.cfg.api_base_url, tz=self.cfg.timezone
)
if len(text) > TELEGRAM_MAX_MESSAGE_LENGTH:
text = text[: TELEGRAM_MAX_MESSAGE_LENGTH - 3] + "..."
try: