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 return
hostname = platform.node() hostname = platform.node()
local_timestamp = ( local_timestamp = datetime.datetime.now(datetime.UTC).astimezone().isoformat()
datetime.datetime.utcnow().replace(tzinfo=datetime.timezone.utc).astimezone().isoformat()
)
payload = json.dumps( payload = json.dumps(
{ {
'routing_key': hook_config['integration_key'], 'routing_key': hook_config['integration_key'],