--- a/ThirdParty/ioss/vtkioss/Ioss_Utils.C
+++ b/ThirdParty/ioss/vtkioss/Ioss_Utils.C
@@ -162,13 +162,13 @@
 void Ioss::Utils::time_and_date(char *time_string, char *date_string, size_t length)
 {
   std::time_t t    = std::time(nullptr);
-  std::string time = fmt::format("{:%H:%M:%S}", fmt::localtime(t));
+  std::string time = fmt::format("{:%H:%M:%S}", *std::localtime(&t));
   std::string date;
   if (length >= 10) {
-    date = fmt::format("{:%Y/%m/%d}", fmt::localtime(t));
+    date = fmt::format("{:%Y/%m/%d}", *std::localtime(&t));
   }
   else {
-    date = fmt::format("{:%y/%m/%d}", fmt::localtime(t));
+    date = fmt::format("{:%y/%m/%d}", *std::localtime(&t));
   }
   copy_string(time_string, time, 9);
   copy_string(date_string, date, length + 1);
--- a/ThirdParty/ioss/vtkioss/cgns/Iocgns_Utils.C
+++ b/ThirdParty/ioss/vtkioss/cgns/Iocgns_Utils.C
@@ -1076,8 +1076,8 @@
 
   CGERR(cg_goto(file_ptr, base, "end"));
   std::time_t t    = std::time(nullptr);
-  std::string date = fmt::format("{:%Y/%m/%d}", fmt::localtime(t));
-  std::string time = fmt::format("{:%H:%M:%S}", fmt::localtime(t));
+  std::string date = fmt::format("{:%Y/%m/%d}", *std::localtime(&t));
+  std::string time = fmt::format("{:%H:%M:%S}", *std::localtime(&t));
 
   std::string code_version = region.get_optional_property("code_version", "unknown");
   std::string code_name    = region.get_optional_property("code_name", "unknown");
