# HG changeset patch # User Sascha L. Teichmann # Date 1558523040 -7200 # Node ID ea49febfbc6019a99d4b912c8f71ff5bd08e6575 # Parent f76a694f7f7b61e8044eea879a22c12909caee9e Calculate quarters correctly in waterlevel classification. diff -r f76a694f7f7b -r ea49febfbc60 pkg/controllers/bottlenecks.go --- a/pkg/controllers/bottlenecks.go Wed May 22 12:53:18 2019 +0200 +++ b/pkg/controllers/bottlenecks.go Wed May 22 13:04:00 2019 +0200 @@ -687,7 +687,7 @@ } f := pfrom pfrom = pfrom.AddDate(0, 3, 0) - label := fmt.Sprintf("Q%d-%d", int(f.Month())/4+1, f.Year()) + label := fmt.Sprintf("Q%d-%d", 1+int(f.Month()+1)/4, f.Year()) return f, f.AddDate(0, 3, 0).Add(-time.Nanosecond), label } }