summaryrefslogtreecommitdiffstats
path: root/data_model/TimeSlot.gd
diff options
context:
space:
mode:
Diffstat (limited to 'data_model/TimeSlot.gd')
-rw-r--r--data_model/TimeSlot.gd7
1 files changed, 7 insertions, 0 deletions
diff --git a/data_model/TimeSlot.gd b/data_model/TimeSlot.gd
index ac1a008..6f92c81 100644
--- a/data_model/TimeSlot.gd
+++ b/data_model/TimeSlot.gd
@@ -36,4 +36,11 @@ static func get_by_schedule_name(schedule_name):
var timeslots = []
for record in records:
timeslots.push_back(TimeSlot_data.new(record))
+ #shift earlier records to the back if they would be <12:00AM after bias correction
+ var bias = Time.get_time_zone_from_system().bias * 60
+ var tsi = 0
+ var tslen = timeslots.size()
+ while tsi < tslen && (timeslots[0].start_time + bias < 0):
+ tsi += 1
+ timeslots.push_back(timeslots.pop_front())
return timeslots