Merge pull request #1740 from influxdb/retention_use_utc

Perform retention checks again UTC time
pull/1751/head
Philip O'Toole 2015-02-25 11:07:36 -08:00
commit 167a7a4361
1 changed files with 1 additions and 1 deletions

View File

@ -302,7 +302,7 @@ func (s *Server) EnforceRetentionPolicies() {
for _, db := range s.databases {
for _, rp := range db.policies {
for _, g := range rp.shardGroups {
if g.EndTime.Add(rp.Duration).Before(time.Now()) {
if g.EndTime.Add(rp.Duration).Before(time.Now().UTC()) {
log.Printf("shard group %d, retention policy %s, database %s due for deletion",
g.ID, rp.Name, db.name)
if err := s.DeleteShardGroup(db.name, rp.Name, g.ID); err != nil {