Fix date handling for NTSB JSON feed

This commit is contained in:
Lucidiot 2021-03-18 14:03:51 +01:00
parent fb6da3efc0
commit 454f3b4608
Signed by: lucidiot
GPG Key ID: 3358C1CA6906FB8D
1 changed files with 1 additions and 1 deletions

View File

@ -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
]