Add timezone support
This commit is contained in:
1 parent
fffc1b0c81
commit
a07943e645
8 files changed
+90
-6
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user