changed to use os.timestamp rather than calendar.now