I was wondering why the timeline included about 29 hours of output always. I realized this code in buildActivityMap was computing the start point as today's time but in UTC, which basically adds my current timezone offset into the calculation (I'm in EST, so it adds 5 hours).
def today = new Date()
def then = timeToday(today.format("HH:mm"), TimeZone.getTimeZone('UTC')) - 1
log.debug "then " + then
log.debug "today " + today
and I got:
2021-03-01 01:25:37.650 pm [debug] today Mon Mar 01 13:25:37 EST 2021
2021-03-01 01:25:37.647 pm [debug] then Sun Feb 28 08:25:00 EST 2021
I changed the code to
def today = new Date()
def then = today - 1