Skip to content

Commit

Permalink
Use getdate\(\) instead of current_date in RedShift query
Browse files Browse the repository at this point in the history
current_date would return only the date, not the whole datetime. getdate\(\) returns the current datetime.
  • Loading branch information
iandees committed Apr 17, 2017
1 parent 48a0b06 commit 556d1b4
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 556d1b4

Please sign in to comment.