Skip to content

Commit f947c56

Browse files
committed
Further eliminate utcnow usage patterns #389
1 parent 58358ac commit f947c56

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

openeo_driver/jobregistry.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def create_job(
439439
"""
440440
if not job_id:
441441
job_id = self.generate_job_id()
442-
created = rfc3339.utcnow()
442+
created = rfc3339.now_utc()
443443
job_data = {
444444
# Essential identifiers
445445
"backend_id": self.backend_id,
@@ -556,7 +556,7 @@ def set_status(
556556
) -> None:
557557
data = {
558558
"status": status,
559-
"updated": rfc3339.datetime(updated) if updated else rfc3339.utcnow(),
559+
"updated": rfc3339.datetime(updated) if updated else rfc3339.now_utc(),
560560
}
561561
if started:
562562
data["started"] = rfc3339.datetime(started)

openeo_driver/server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
def build_backend_deploy_metadata(packages: List[str]) -> dict:
1818
"""Build deploy metadata (version listing of provided python packages)"""
1919
return {
20-
"date": rfc3339.utcnow(),
20+
"date": rfc3339.now_utc(),
2121
"versions": get_package_versions(packages),
2222
}
2323

openeo_driver/views.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ def job_results_canonical_url() -> str:
11091109
"license": "proprietary", # TODO?
11101110
"extent": {
11111111
"spatial": {"bbox": [[-180, -90, 180, 90]]},
1112-
"temporal": {"interval": [[rfc3339.utcnow(), rfc3339.utcnow()]]},
1112+
"temporal": {"interval": [[rfc3339.now_utc(), rfc3339.now_utc()]]},
11131113
},
11141114
"links": [
11151115
{

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"flask>=2.0.0",
5353
"werkzeug>=3.0.3", # https://github.com/Open-EO/openeo-python-driver/issues/243
5454
"requests>=2.28.0",
55-
"openeo>=0.38.0",
55+
"openeo>=0.41.0.a1.dev",
5656
"openeo_processes==0.0.4", # 0.0.4 is special build/release, also see https://github.com/Open-EO/openeo-python-driver/issues/152
5757
"gunicorn>=20.0.1",
5858
"numpy>=1.22.0",

0 commit comments

Comments
 (0)