Skip to content

Commit

Permalink
Replace deprecated datetime.utcnow()
Browse files Browse the repository at this point in the history
  • Loading branch information
misery committed May 30, 2024
1 parent ca96fe1 commit b69d8bf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions extended_approval/extension.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytz
from datetime import datetime, timedelta
from datetime import datetime, timedelta, UTC

from djblets.datagrid.grids import Column

Expand Down Expand Up @@ -104,7 +103,7 @@ def calc_epoch(settings, config, obj):


def check_grace_period(settings, diffset, shipit):
now = datetime.utcnow().replace(tzinfo=pytz.utc)
now = datetime.now(UTC)

epoch = calc_epoch(settings, CONFIG_GRACE_PERIOD_DIFFSET, diffset)
if epoch > now:
Expand Down

0 comments on commit b69d8bf

Please sign in to comment.