In some cases the stored database state would be misinterpreted causing abnormal wait periods that crashes the program on startup.
This change converts all time compares to UTC asn the database value was already UTC.
It also adds a clamping function to prevent crashes on extreme values (using 24h pause instead of crash).