uses local time in milliseconds