Commit 0051bd0b authored by Łukasz Nowak's avatar Łukasz Nowak

promise: Use UTC time for collector.db promises

Collector db is fixed to store UTC times, so those promises need to follow.
parent 099295af
......@@ -81,7 +81,7 @@ def main():
args = parser.parse_args()
# get last minute
now = datetime.datetime.now()
now = datetime.datetime.utcnow()
currentdate = now.strftime('%Y-%m-%d')
delta = datetime.timedelta(minutes=1)
currenttime = now - delta
......
......@@ -83,7 +83,7 @@ def main():
result, message, error = checkMemoryUsage(
database_path,
datetime.now(),
datetime.utcnow(),
user=args.user,
threshold=args.threshold,
unit=args.unit,
......
......@@ -207,7 +207,7 @@ is assumed constant and used to predict in how many days the disk would become f
disk_partition = self.getConfig('test-disk-partition', '/dev/sda1')
else:
# get last minute
now = datetime.datetime.now()
now = datetime.datetime.utcnow()
currentdate = now.strftime('%Y-%m-%d')
currenttime = now - datetime.timedelta(minutes=1)
currenttime = currenttime.time().strftime('%H:%M')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment