1
0
Fork 0
mirror of https://github.com/shouptech/tempgopher.git synced 2026-02-03 16:49:42 +00:00

Use static future date

This commit is contained in:
Emma 2018-10-03 08:25:52 -06:00
parent 7bb6f5feef
commit b2fd820a66

View file

@ -77,7 +77,7 @@ func ProcessSensor(sensor Sensor, state State) (State, error) {
// When things reach the right temperature, set the duration to the future
// TODO: Better handling of this. Changed should maintain when the state changed.
// Probably need a new flag in the State struct.
future := time.Now().AddDate(10, 0, 0)
future := time.Date(2999, 1, 1, 0, 0, 0, 0, time.UTC)
switch {
case temp > sensor.HighTemp && temp < sensor.LowTemp: