EOX GitLab Instance

Commit 0ca2e73b authored by Fabian Schindler's avatar Fabian Schindler
Browse files

Fixing datetime handling

parent ec1a19d3
Pipeline #22619 passed with stage
in 48 seconds
......@@ -5,6 +5,7 @@ from urllib.parse import urljoin
from zipfile import ZipFile
import csv
import re
from datetime import datetime, timezone
from lxml import etree
import requests
......@@ -111,9 +112,13 @@ class IndexFileParser:
record["productId"],
self.parse_geometry(record),
self.parse_bbox(record),
None,
# use availability time, strip the "Z", otherwise parsing will fail
datetime.fromisoformat(record["availabilityTime"][:-1]).replace(
tzinfo=timezone.utc
),
{
# Timings are all mandatory
"datetime": None,
"start_datetime": record["beginAcquisition"],
"end_datetime": record["endAcquisition"],
"created": record["availabilityTime"],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment