Skip to content

Commit

Permalink
refactor: replace deprecated function datetime.utcnow()
Browse files Browse the repository at this point in the history
  • Loading branch information
sarabveer committed Mar 30, 2024
1 parent 36fcca0 commit 7f169bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import logging
import argparse
import configparser
from datetime import datetime
from datetime import datetime, UTC
import urllib3

def main():
Expand Down Expand Up @@ -188,7 +188,7 @@ def send_to_influx(stats, config):
write_api = influx_client.write_api(write_options = SYNCHRONOUS)

series = []
current_time = datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')
current_time = datetime.now(UTC).strftime('%Y-%m-%dT%H:%M:%SZ')

for stats_down in stats['downstream']:
series.append(Point.from_dict({
Expand Down

0 comments on commit 7f169bf

Please sign in to comment.