Skip to content

Commit

Permalink
fix pytz API usage
Browse files Browse the repository at this point in the history
  • Loading branch information
HarHarLinks committed Feb 11, 2024
1 parent 48d0b9f commit 76ee31d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions matrix_reminder_bot/bot_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,8 @@ async def _confirm_reminder(self, reminder: Reminder):

return

# Convert a timedelta to a formatted time (ex. May 25 2020, 01:31)
start_time = reminder.start_time.replace(
tzinfo=pytz.timezone(reminder.timezone)
)
# Convert a datetime to a formatted time (ex. May 25 2020, 01:31)
start_time = pytz.timezone(reminder.timezone).localize(reminder.start_time)
human_readable_start_time = start_time.strftime("%b %d %Y, %H:%M")

# Get a textual representation of who will be notified by this reminder
Expand Down

0 comments on commit 76ee31d

Please sign in to comment.