File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import os
44import subprocess
5- from datetime import datetime
5+ from datetime import datetime , timezone
66from typing import Any , Dict , Optional , Tuple
77
88from flask import Blueprint , current_app , jsonify
@@ -79,7 +79,7 @@ def health_check() -> Tuple[Any, int]:
7979
8080 checks : Dict [str , Any ] = {
8181 'status' : 'healthy' if all_healthy else 'unhealthy' ,
82- 'timestamp' : datetime .utcnow ( ).isoformat () + 'Z' ,
82+ 'timestamp' : datetime .now ( timezone . utc ). replace ( tzinfo = None ).isoformat () + 'Z' ,
8383 'checks' : check_results
8484 }
8585
@@ -99,7 +99,7 @@ def liveness_check() -> Tuple[Any, int]:
9999 """
100100 return jsonify ({
101101 'status' : 'alive' ,
102- 'timestamp' : datetime .utcnow (). isoformat () + 'Z'
102+ 'timestamp' : datetime .now ( timezone . utc ). replace ( tzinfo = None ). isoformat () + 'Z'
103103 }), 200
104104
105105
@@ -172,7 +172,7 @@ def version_check() -> Tuple[Any, int]:
172172 git_info = get_git_info ()
173173
174174 response = {
175- 'timestamp' : datetime .utcnow ( ).isoformat () + 'Z' ,
175+ 'timestamp' : datetime .now ( timezone . utc ). replace ( tzinfo = None ).isoformat () + 'Z' ,
176176 'git' : git_info ,
177177 }
178178
You can’t perform that action at this time.
0 commit comments