From c3f8b05a68936ef777596b2d0301adea9b25e299 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sun, 23 Jun 2024 17:01:54 -0700 Subject: [PATCH] Fix test warning in PagerDuty hook. --- borgmatic/hooks/pagerduty.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/borgmatic/hooks/pagerduty.py b/borgmatic/hooks/pagerduty.py index aeeec97..6ec1a6e 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'],