Skip to content

Commit

Permalink
remind: replace use of deprecated datetime.utcfromtimestamp()
Browse files Browse the repository at this point in the history
  • Loading branch information
dgw committed Jun 3, 2023
1 parent e84ac51 commit 571444b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sopel/modules/remind.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from __future__ import annotations

import collections
from datetime import datetime
from datetime import datetime, timezone
import io # don't use `codecs` for loading the DB; it will split lines on some IRC formatting
import logging
import os
Expand Down Expand Up @@ -263,7 +263,7 @@ def remind_in(bot, trigger):
timezone,
trigger.nick,
trigger.sender,
datetime.utcfromtimestamp(timestamp))
datetime.fromtimestamp(timestamp, timezone.utc))
bot.reply('Okay, will remind at %s' % human_time)
else:
bot.reply('Okay, will remind in %s secs' % duration)
Expand Down Expand Up @@ -495,7 +495,7 @@ def remind_at(bot, trigger):
reminder.timezone.zone,
trigger.nick,
trigger.sender,
datetime.utcfromtimestamp(timestamp))
datetime.fromtimestamp(timestamp, timezone.utc))
bot.reply('Okay, will remind at %s' % human_time)
else:
bot.reply('Okay, will remind in %s secs' % duration)
Expand Down

0 comments on commit 571444b

Please sign in to comment.