diff --git a/bundles/bootshorn/files/temperature b/bundles/bootshorn/files/temperature index 9d73780..0599ce5 100755 --- a/bundles/bootshorn/files/temperature +++ b/bundles/bootshorn/files/temperature @@ -32,7 +32,12 @@ print(f"@{temperature_date}: {temperature}°C") filename = temperature_date.strftime("%Y-%m-%d_00-00-00.000000%z") + ".log" logpath = os.path.join(TEMPERATURE_LOG_DIR, filename) +now_utc = datetime.datetime.now(datetime.timezone.utc) with open(logpath, "a+", newline="") as logfile: writer = csv.writer(logfile) - writer.writerow([temperature_date.strftime('%Y-%m-%d_%H-%M-%S.%f%z'), temperature]) \ No newline at end of file + writer.writerow([ + now_utc.strftime('%Y-%m-%d_%H-%M-%S.%f%z'), # current UTC time + temperature_date.strftime('%Y-%m-%d_%H-%M-%S.%f%z'), # date of temperature reading + temperature, + ]) \ No newline at end of file diff --git a/bundles/bootshorn/metadata.py b/bundles/bootshorn/metadata.py index 1dd1eee..3ef8876 100644 --- a/bundles/bootshorn/metadata.py +++ b/bundles/bootshorn/metadata.py @@ -25,7 +25,7 @@ defaults = { 'systemd-timers': { 'bootshorn-temperature': { 'command': '/opt/bootshorn/temperature', - 'when': '*:0/5', + 'when': '*:0/10', 'working_dir': '/opt/bootshorn', 'user': 'ckn', 'group': 'ckn',