Updated client to handle datetimes if passed