Probably a carryover from the old code, but this will give the wrong time, since it's converting local time assuming it's utc time. It should just be int(time.time())