Fix test warning in PagerDuty hook.

This commit is contained in:
Dan Helfman 2024-06-23 17:01:54 -07:00
parent f4fcf92bd6
commit c3f8b05a68

View file

@ -40,9 +40,7 @@ def ping_monitor(hook_config, config, config_filename, state, monitoring_log_lev
return
hostname = platform.node()
local_timestamp = (
datetime.datetime.utcnow().replace(tzinfo=datetime.timezone.utc).astimezone().isoformat()
)
local_timestamp = datetime.datetime.now(datetime.UTC).astimezone().isoformat()
payload = json.dumps(
{
'routing_key': hook_config['integration_key'],