Skip to content

Commit

Permalink
Do not generate year report from the very start datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
gtt116 committed Oct 31, 2018
1 parent cd47db3 commit ecafd9f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions disney/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ def to_timestamp(time_str):
def format_date(dt):
return dt.strftime('%Y-%m-%d')

def get_last_date():
last = datetime.now() - timedelta(days=14)
return last.strftime('%Y-%m-%d')

def year():
db = fetch.get_influxdb()
last = history.get_latest_yearly()
if not last:
# This project's birthday
last = "2016-09-01"
last = get_last_date()
log.debug("Get data from %s." % last)

result = db.query(
Expand Down

0 comments on commit ecafd9f

Please sign in to comment.