Fix thread safety of date formatter