Format date and times according to ISO 8601
Protected a malloc in jansson ffi