fix: add null pointer check with std::localtime (#2846)

1 file changed