Closed Gehock closed 1 year ago
Currently Event just uses the server's timezone.
A quick fix, should be made configurable via config.py:
config.py
def createEmbed(self) -> Embed: date = self.date.strftime(f"%a %Y-%m-%d - %H:%M {cfg.TIME_ZONE}") title = f"{self.title} ({date})" local_time = f"<t:{int(self.date.replace(tzinfo=datetime.timezone(offset=datetime.timedelta(hours=0))).timestamp())}>" relative_time = f"<t:{int(self.date.replace(tzinfo=datetime.timezone(offset=datetime.timedelta(hours=0))).timestamp())}:R>" server_port = (f"\nServer port: **{self.port}**" if self.port != cfg.PORT_DEFAULT else "") event_description = (f"\n\n{self.description}" if self.description else "")
Fixed in f3c821bd1127ab15349bb925cb7d17e5f60fbcf1. Dates within the events are still timezone-naive, but local time is converted into UTC correctly.
Currently Event just uses the server's timezone.
A quick fix, should be made configurable via
config.py
: