diff options
Diffstat (limited to 'cleaner.go')
-rw-r--r-- | cleaner.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -120,6 +120,13 @@ func getTimespan(t time.Time, cfg *Config) (span time.Time, err error) { min = (min / 10) * 10 span = time.Date(y, m, d, h, min, 0, 0, loc) + case cfg.Interval == "30min": //Round the date into 10 minutes + y, m, d := t.Date() + h := t.Hour() + min := t.Minute() + min = (min / 30) * 30 + span = time.Date(y, m, d, h, min, 0, 0, loc) + case cfg.Interval == "hour": //Round the date into hour y, m, d := t.Date() h := t.Hour() |