Fix Collection UDF date serialization

We were not correctly formatted dates for collection UDFs, which broke the
API for editing, since the server sent dates down in a format it could
not parse.
Merge pull request #1510 from maurizi/fix-udf-collection-date-serialization

Fix Collection UDF date serialization