summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cleaner.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cleaner.go b/cleaner.go
index 247abef..c59b562 100644
--- a/cleaner.go
+++ b/cleaner.go
@@ -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