Skip to content

Commit

Permalink
write the next hour to period=past, not 2 hours from now.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ted Pearson committed Dec 11, 2021
1 parent 2e838a9 commit 079e119
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (app App) RunForecast(src string, loc Location) {
log.Printf("%+v", err)
}
// write next hour to past forecast measurement
nextHour := time.Now().Truncate(time.Hour).Add(time.Hour * 2)
nextHour := time.Now().Truncate(time.Hour).Add(time.Hour)
for _, record := range records.Values {
if nextHour.Equal(record.Time) {
nextHourRecord := weather.Records{
Expand Down

0 comments on commit 079e119

Please sign in to comment.