This udf is used at read.
This udf is used at read. It is how we parse a date format from a String to the java TimeStamp type that spark sql expects. We go via UTC time. This is now "safe" if the date format cannot be parsed, this will return a null.
This udf is used at write.
This udf is used at write. It converts the java.sql.Timestamp object to a string in the correct format specified (in Joda standard) by the column definition. This is now "safe" if the date format cannot be parsed, this will return a null.