From 260fa2214e298686678d43ca58bcbfd493d563b3 Mon Sep 17 00:00:00 2001 From: dusoleil Date: Sat, 27 Aug 2022 00:39:27 -0400 Subject: Track time with unix timestamps instead of minutes --- data_model/DataHelpers.gd | 6 ++++-- data_model/data.db | Bin 36864 -> 36864 bytes 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/data_model/DataHelpers.gd b/data_model/DataHelpers.gd index 9e8d7cd..86a05de 100644 --- a/data_model/DataHelpers.gd +++ b/data_model/DataHelpers.gd @@ -4,8 +4,10 @@ static func dummy_data(data): return data static func timeofday(time): - var hour = time / 60 - var minute = time % 60 + time += (Time.get_time_zone_from_system().bias * 60) + time = Time.get_time_dict_from_unix_time(time) + var hour = time.hour + var minute = time.minute var am = hour < 12 hour = hour % 12 if hour == 0: diff --git a/data_model/data.db b/data_model/data.db index 4951f46..b3b0221 100644 Binary files a/data_model/data.db and b/data_model/data.db differ -- cgit v1.2.3