Get the time object from the params
Little bit of refactoring