Skip to content

Commit

Permalink
Flattener - include microseconds to 3 places, not just zero's
Browse files Browse the repository at this point in the history
  • Loading branch information
jarofgreen committed Nov 8, 2023
1 parent 49ffb11 commit 29fa1a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/library/flatten.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def _add_to_output(self, canonical_name, value, output):
dt_object = dateutil.parser.parse(value)
if dt_object:
# This mirrors output of old flaterrer system
value = dt_object.strftime("%Y-%m-%dT%H:%M:%S.000Z")
value = dt_object.strftime("%Y-%m-%dT%H:%M:%S.%f")[:-3]+"Z"
else:
# If can't parse, don't add as solr will error
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
{
"dataset_version": "2.03",
"iati_identifier": "ACT-1",
"last_updated_datetime": "2023-07-17T08:05:08.000Z"
"last_updated_datetime": "2023-07-17T08:05:08.160Z"
}
]

0 comments on commit 29fa1a5

Please sign in to comment.