made ToDate/ToString thread-safe