Skip to content

Commit

Permalink
fix: Support publishers who incorrectly only publish dates, not datet…
Browse files Browse the repository at this point in the history
…imes (india_assam_finance_department)
  • Loading branch information
jpmckinney committed May 3, 2024
1 parent 71f5bf5 commit f9e53e6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion data_registry/process_manager/task/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ def url_for_collection(*parts):

def parse_date(dt):
if dt:
return datetime.strptime(dt, "%Y-%m-%dT%H:%M:%S%z").date()
if len(dt) == 10:
return datetime.strptime(dt, "%Y-%m-%d").date()
else:
return datetime.strptime(dt, "%Y-%m-%dT%H:%M:%S%z").date()
return dt


Expand Down

0 comments on commit f9e53e6

Please sign in to comment.