Skip to content

Commit

Permalink
Merge pull request #189 from tilezen/iandees/better-date-diff
Browse files Browse the repository at this point in the history
Use getdate() instead of current_date in RedShift query
  • Loading branch information
iandees authored Apr 17, 2017
2 parents 48a0b06 + 556d1b4 commit 107c1d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tilequeue/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ def tilequeue_prune_tiles_of_interest(cfg, peripherals):
cur.execute("""
select x, y, z, tilesize, count(*)
from tile_traffic_v4
where (date >= dateadd(day, -{days}, current_date))
where (date >= dateadd(day, -{days}, getdate()))
and (z between 0 and {max_zoom})
and (x between 0 and pow(2,z)-1)
and (y between 0 and pow(2,z)-1)
Expand Down

0 comments on commit 107c1d4

Please sign in to comment.