diff --git a/aosstower/level_00/influxdb.py b/aosstower/level_00/influxdb.py index aeb2d54fa813df9c66b938d828e2210f80f16a03..1ffdb97d555dc665b0962365e6ae821bb5330f46 100644 --- a/aosstower/level_00/influxdb.py +++ b/aosstower/level_00/influxdb.py @@ -4,7 +4,7 @@ import logging.handlers import sys import time from collections.abc import Iterable -from datetime import timedelta +from datetime import datetime, timedelta from pathlib import Path from urllib.parse import urlencode @@ -90,7 +90,7 @@ class Updater: # current minute was 13 and the submit interval was 5 minutes, then data would be submitted at 18, 23, 28, # etc. If data collection went down and the next recorded current minute was 14, then data would be submitted # at 19, 24, 29, etc (inconsistent). - reference = pd.datetime(record["timestamp"].year, 1, 1) + reference = datetime(record["timestamp"].year, 1, 1) progress = (record["timestamp"] - reference).total_seconds() % self.submit_interval # If data hits or will pass over a submit_interval interval, return data. if progress == 0 or progress > self.submit_interval - self.data_interval: