port to new time api