File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 3737
3838from collections import ChainMap
3939from copy import deepcopy
40- from datetime import datetime
40+ from datetime import datetime , UTC
4141from http import HTTPStatus
4242import logging
4343from typing import Any , Tuple , Union
@@ -625,7 +625,7 @@ def get_collection_items(
625625 'href' : '/' .join (uri .split ('/' )[:- 1 ])
626626 })
627627
628- content ['timeStamp' ] = datetime .utcnow ( ).strftime (
628+ content ['timeStamp' ] = datetime .now ( UTC ).strftime (
629629 '%Y-%m-%dT%H:%M:%S.%fZ' )
630630
631631 # Set response language to requested provider locale
Original file line number Diff line number Diff line change 11# =================================================================
22#
33# Authors: Tom Kralidis <tomkralidis@gmail.com>
4+ # Francesco Bartoli <xbartolone@gmail.com>
45#
56# Copyright (c) 2025 Tom Kralidis
7+ # Copyright (c) 2025 Francesco Bartoli
68#
79# Permission is hereby granted, free of charge, to any person
810# obtaining a copy of this software and associated documentation
2729#
2830# =================================================================
2931
30- from datetime import datetime
32+ from datetime import datetime , UTC
3133from pathlib import Path
3234import sys
3335from typing import Union
@@ -226,7 +228,7 @@ def get_anytext(bag: Union[list, str]) -> str:
226228 'geometry' : geometry ,
227229 'properties' : {
228230 'created' : issued ,
229- 'updated' : datetime .utcnow ( ).strftime ('%Y-%m-%dT%H:%M:%SZ' ),
231+ 'updated' : datetime .now ( UTC ).strftime ('%Y-%m-%dT%H:%M:%SZ' ),
230232 'type' : type_ ,
231233 'title' : title ,
232234 'description' : description ,
You can’t perform that action at this time.
0 commit comments