diff options
author | Daniel Langesten <daniel.langest@gmail.com> | 2015-03-10 11:39:52 +0100 |
---|---|---|
committer | Daniel Langesten <daniel.langest@gmail.com> | 2015-03-10 11:39:52 +0100 |
commit | 08ba2e4238fdc518afda1191fb56bc457af3b2b6 (patch) | |
tree | 3b36aae9fc4bcce8f81b42ebd9d4cd1038303179 | |
parent | d03157bcd38f3644b94bda66eda7ffd7453d0c75 (diff) |
fixed bug where the intervals were calculated wrong
-rw-r--r-- | cleaner.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -89,14 +89,14 @@ func getTimespan(t time.Time) (span time.Time, err error) { y, m, d := t.Date() h := t.Hour() min := t.Minute() - min = min / 5 + min = (min / 5) * 5 span = time.Date(y, m, d, h, min, 0, 0, loc) case TIMESPAN == "10min": //Round the date into 10 minutes y, m, d := t.Date() h := t.Hour() min := t.Minute() - min = min / 10 + min = (min / 10) * 10 span = time.Date(y, m, d, h, min, 0, 0, loc) case TIMESPAN == "hour": //Round the date into hour |