Fix date handling for NTSB JSON feed
This commit is contained in:
parent
fb6da3efc0
commit
454f3b4608
|
@ -32,7 +32,7 @@ def ensure_array: (. // []) | if type == "array" then . else [.] end;
|
|||
]
|
||||
}
|
||||
# Optional publication date
|
||||
| if $item.pubDate then .date_published = ($item.pubDate | strptime("%a, %d %b %Y %T %z") | mktime | todateiso8601) else . end
|
||||
| if $item.pubDate then .date_published = ($item.pubDate | strptime("%a, %d %b %Y %T %Z") | mktime | todateiso8601) else . end
|
||||
# Optional author
|
||||
| if $item.author then .author = {"name": $item.author} | .authors = [.author] else . end
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue