Skip to content

Commit

Permalink
Replace use of utcnow() in recordbuilder module
Browse files Browse the repository at this point in the history
  • Loading branch information
tw4l committed Oct 28, 2024
1 parent 3d720dd commit 3c14154
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions warcio/recordbuilder.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import datetime
import six
import tempfile

from datetime import datetime, timezone
from io import BytesIO

from warcio.recordloader import ArcWarcRecord, ArcWarcRecordLoader
Expand Down Expand Up @@ -153,7 +153,7 @@ def _make_warc_id(cls):

@classmethod
def _make_warc_date(cls, use_micros=False):
return datetime_to_iso_date(datetime.datetime.utcnow(), use_micros=use_micros)
return datetime_to_iso_date(datetime.now(timezone.utc), use_micros=use_micros)

def ensure_digest(self, record, block=True, payload=True):
if block:
Expand Down

0 comments on commit 3c14154

Please sign in to comment.