diff options
author | dusoleil <howcansocksbereal@gmail.com> | 2022-08-27 00:39:27 -0400 |
---|---|---|
committer | dusoleil <howcansocksbereal@gmail.com> | 2022-08-27 00:39:27 -0400 |
commit | 260fa2214e298686678d43ca58bcbfd493d563b3 (patch) | |
tree | cf6296ca4a36750d9474701707d8b1bf60e02c61 | |
parent | d2b5fce7ef3e4988768a9df60eb9cee8b907562c (diff) | |
download | Planner-260fa2214e298686678d43ca58bcbfd493d563b3.tar.gz Planner-260fa2214e298686678d43ca58bcbfd493d563b3.zip |
Track time with unix timestamps instead of minutes
-rw-r--r-- | data_model/DataHelpers.gd | 6 | ||||
-rw-r--r-- | 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 Binary files differindex 4951f46..b3b0221 100644 --- a/data_model/data.db +++ b/data_model/data.db |