Mercurial > code > home > repos > gcalendarwatch
changeset 4:fb02ad302f2f
include more recent-past events
Ignore-this: 94936ca53788dba75df8e433e6da98ce
author | drewp@bigasterisk.com |
---|---|
date | Thu, 16 Jan 2020 23:39:42 -0800 |
parents | acb378b62dfd |
children | 0185b30c9e8a |
files | gcalendarwatch |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/gcalendarwatch Thu Jan 16 23:34:11 2020 -0800 +++ b/gcalendarwatch Thu Jan 16 23:39:42 2020 -0800 @@ -152,7 +152,7 @@ def dayRange(days): now = datetime.datetime.now(tzlocal()) - start = now + start = now - datetime.timedelta(hours=12) end = now + datetime.timedelta(days=days) return start, end @@ -361,9 +361,8 @@ sync = SyncToMongo(conf, mongoOut, agendaGraph, countdownGraph) read = ReadMongoEvents(mongoOut) - sync.updateGraphs(read.getEvents( - datetime.datetime.now().replace(hour=0, minute=0, second=0), - datetime.datetime.now() + datetime.timedelta(days=60))) + s, e = dayRange(60) + sync.updateGraphs(read.getEvents(s, e)) poller = Poller(sync, conf['minutes_between_polls'] * 60) if args['--now']: