fixed unsafe issue when instantiating new DateTime()