From 008366697aba8046fd33ae1f3707972d87c9a342 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 21 Nov 2018 11:40:10 -0800 Subject: use isoformat() to format dates This shouldn't change behavior; it's just more consistent. --- python/fatcat_tools/harvest/oaipmh.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/fatcat_tools/harvest/oaipmh.py') diff --git a/python/fatcat_tools/harvest/oaipmh.py b/python/fatcat_tools/harvest/oaipmh.py index 4485a59f..1f6c54b6 100644 --- a/python/fatcat_tools/harvest/oaipmh.py +++ b/python/fatcat_tools/harvest/oaipmh.py @@ -53,7 +53,7 @@ from pykafka import KafkaClient import sickle from fatcat_tools.workers import most_recent_message -from .harvest_common import HarvestState, DATE_FMT +from .harvest_common import HarvestState class HarvestOaiPmhWorker: @@ -83,7 +83,7 @@ class HarvestOaiPmhWorker: def fetch_date(self, date): api = sickle.Sickle(self.endpoint_url) - date_str = date.strftime(DATE_FMT) + date_str = date.isoformat() produce_topic = self.kafka.topics[self.produce_topic] # this dict kwargs hack is to work around 'from' as a reserved python keyword # recommended by sickle docs -- cgit v1.2.3