Setup api to use time objects