diff --git a/pygeometa/schemas/ogcapi_records/__init__.py b/pygeometa/schemas/ogcapi_records/__init__.py index bbfe57e..c9900fb 100644 --- a/pygeometa/schemas/ogcapi_records/__init__.py +++ b/pygeometa/schemas/ogcapi_records/__init__.py @@ -134,12 +134,12 @@ def write(self, mcf: dict, stringify: str = True) -> Union[dict, str]: if begin in ['now', 'None', None]: begin = '..' else: - begin = str(begin) + begin = begin.strftime('%Y-%m-%dT%H:%M:%SZ') if end in ['now', 'None', None]: end = '..' else: - end = str(end) + end = end.strftime('%Y-%m-%dT%H:%M:%SZ') if [begin, end] == [None, None]: record['time'] = None