diff --git a/setup.py b/setup.py index c657ec9..01d922e 100755 --- a/setup.py +++ b/setup.py @@ -42,6 +42,7 @@ setuptools.setup(name='warcprox', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', 'Topic :: Internet :: Proxy Servers', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Software Development :: Libraries :: Python Modules', diff --git a/warcprox/warcprox.py b/warcprox/warcprox.py index f2d869b..4410ca6 100644 --- a/warcprox/warcprox.py +++ b/warcprox/warcprox.py @@ -748,7 +748,7 @@ class WarcWriterThread(threading.Thread): # returns a tuple (principal_record, request_record) where principal_record is either a response or revisit record def build_warc_records(self, recorded_url): - warc_date = warctools.warc.warc_datetime_str(datetime.now()) + warc_date = warctools.warc.warc_datetime_str(datetime.utcnow()) dedup_info = None if self.dedup_db is not None and recorded_url.response_recorder.payload_digest is not None: @@ -802,7 +802,7 @@ class WarcWriterThread(threading.Thread): refers_to_date=None): if warc_date is None: - warc_date = warctools.warc.warc_datetime_str(datetime.now()) + warc_date = warctools.warc.warc_datetime_str(datetime.utcnow()) record_id = warctools.WarcRecord.random_warc_uuid() @@ -851,7 +851,7 @@ class WarcWriterThread(threading.Thread): def timestamp17(self): - now = datetime.now() + now = datetime.utcnow() return '{}{}'.format(now.strftime('%Y%m%d%H%M%S'), now.microsecond//1000) def _close_writer(self): @@ -865,7 +865,7 @@ class WarcWriterThread(threading.Thread): self._f = None def _build_warcinfo_record(self, filename): - warc_record_date = warctools.warc.warc_datetime_str(datetime.now()) + warc_record_date = warctools.warc.warc_datetime_str(datetime.utcnow()) record_id = warctools.WarcRecord.random_warc_uuid() headers = []