It is not thread safe due to this code in SimpleDateFormat (in Sun JVM 1.7.0_02):
private StringBuffer format(Date date, StringBuffer toAppendTo, FieldDelegate delegate) {
Each format call stores the date in the calendar variable of the SimpleDateFormat member, and then applies the formatting to the contents of the calendar variable (and not the date parameter).
Thus, as each format call occurs, the data for all currently running formats can change (depending on the consistency model of your architecture) the data in the calendar member variable that is used by every other thread.
So, if you run several simultaneous calls in the format, you cannot get an exception, but each call can return the result obtained from the date of one of the other calls in the format, or a hybrid combination of data from different calls in the format.
source share