Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pygeoapi/api/itemtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

from collections import ChainMap
from copy import deepcopy
from datetime import datetime
from datetime import datetime, UTC
from http import HTTPStatus
import logging
from typing import Any, Tuple, Union
Expand Down Expand Up @@ -625,7 +625,7 @@ def get_collection_items(
'href': '/'.join(uri.split('/')[:-1])
})

content['timeStamp'] = datetime.utcnow().strftime(
content['timeStamp'] = datetime.now(UTC).strftime(
'%Y-%m-%dT%H:%M:%S.%fZ')

# Set response language to requested provider locale
Expand Down
6 changes: 4 additions & 2 deletions tests/load_tinydb_records.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# =================================================================
#
# Authors: Tom Kralidis <tomkralidis@gmail.com>
# Francesco Bartoli <xbartolone@gmail.com>
#
# Copyright (c) 2025 Tom Kralidis
# Copyright (c) 2025 Francesco Bartoli
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
Expand All @@ -27,7 +29,7 @@
#
# =================================================================

from datetime import datetime
from datetime import datetime, UTC
from pathlib import Path
import sys
from typing import Union
Expand Down Expand Up @@ -226,7 +228,7 @@ def get_anytext(bag: Union[list, str]) -> str:
'geometry': geometry,
'properties': {
'created': issued,
'updated': datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ'),
'updated': datetime.now(UTC).strftime('%Y-%m-%dT%H:%M:%SZ'),
'type': type_,
'title': title,
'description': description,
Expand Down
Loading