diff --git a/borgmatic/hooks/pagerduty.py b/borgmatic/hooks/pagerduty.py index aeeec97c..6ec1a6ef 100644 --- a/borgmatic/hooks/pagerduty.py +++ b/borgmatic/hooks/pagerduty.py @@ -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'],