summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers/crossref.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-11-14 19:03:06 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-11-14 19:03:06 -0800
commit546b5afcf91992d26437b47107eb9433cb1656bb (patch)
tree4d24c5311b7d1ea67d527c8ca9a4aafe0dc59ed4 /python/fatcat_tools/importers/crossref.py
parentf468d3776c3d295d7d104cd3921146ab9618b21c (diff)
downloadfatcat-546b5afcf91992d26437b47107eb9433cb1656bb.tar.gz
fatcat-546b5afcf91992d26437b47107eb9433cb1656bb.zip
python tweaks for date/datetime rust fix
Diffstat (limited to 'python/fatcat_tools/importers/crossref.py')
-rw-r--r--python/fatcat_tools/importers/crossref.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/python/fatcat_tools/importers/crossref.py b/python/fatcat_tools/importers/crossref.py
index 01143551..c4695c7f 100644
--- a/python/fatcat_tools/importers/crossref.py
+++ b/python/fatcat_tools/importers/crossref.py
@@ -203,14 +203,11 @@ class FatcatCrossrefImporter(FatcatImporter):
# got some NoneType, even though at least year is supposed to be set
release_date = None
elif len(release_date) == 3:
- release_date = datetime.datetime(year=release_date[0], month=release_date[1], day=release_date[2])
+ release_date = datetime.date(year=release_date[0], month=release_date[1], day=release_date[2])
else:
# only the year is actually required; mangle to first day for date
# (TODO: something better?)
- release_date = datetime.datetime(year=release_date[0], month=1, day=1)
- # convert to string ISO datetime format (if not null)
- if release_date:
- release_date = release_date.isoformat() + "Z"
+ release_date = datetime.date(year=release_date[0], month=1, day=1)
re = fatcat_client.ReleaseEntity(
work_id=None,