Adapting to new time API.