diff --git a/DDCore/src/IOV.cpp b/DDCore/src/IOV.cpp
index 73259da209cff5f40066d2519244c13ad102c481..0e1e321abf8c58b20cc6888c343ff65ec13bdd06 100644
--- a/DDCore/src/IOV.cpp
+++ b/DDCore/src/IOV.cpp
@@ -137,34 +137,37 @@ void IOV::move(IOV& from)   {
 string IOV::str()  const  {
   char text[256];
   if ( iovType )  {
+    /// Need the long(x) casts for compatibility with Apple MAC
     if ( iovType->name[0] != 'e' )   {
       ::snprintf(text,sizeof(text),"%s(%u):[%ld-%ld]",
-                 iovType->name.c_str(), iovType->type, keyData.first, keyData.second);
+                 iovType->name.c_str(), iovType->type, long(keyData.first), long(keyData.second));
     }
     else if ( iovType->name == "epoch" )  {
       struct tm  time_buff;
       char c_since[64], c_until[64];
+      static constexpr const Key_value_type nil = 0;
       static const Key_value_type max_time = detail::makeTime(2099,12,31,24,59,59);
-      time_t since = std::min(std::max(keyData.first,0L),  max_time);
-      time_t until = std::min(std::max(keyData.second,0L), max_time);
+      time_t since = std::min(std::max(keyData.first, nil), max_time);
+      time_t until = std::min(std::max(keyData.second,nil), max_time);
       struct tm* tm_since = ::gmtime_r(&since,&time_buff);
       struct tm* tm_until = ::gmtime_r(&until,&time_buff);
       if ( nullptr == tm_since || nullptr == tm_until )    {
-        except("IOV::str"," Invalid epoch time stamp: %d:[%ld-%ld]", type, keyData.first, keyData.second);
+        except("IOV::str"," Invalid epoch time stamp: %d:[%ld-%ld]",
+               type, long(keyData.first), long(keyData.second));
       }
       ::strftime(c_since,sizeof(c_since),"%d-%m-%Y %H:%M:%S", tm_since);
       ::strftime(c_until,sizeof(c_until),"%d-%m-%Y %H:%M:%S", tm_until);
-      ::snprintf(text,sizeof(text),"%s(%d):[%s - %s]",
-                 iovType->name.c_str(),iovType->type,
+      ::snprintf(text,sizeof(text),"%s(%u):[%s - %s]",
+                 iovType->name.c_str(), iovType->type,
 		 c_since, c_until);
     }
     else   {
       ::snprintf(text,sizeof(text),"%s(%u):[%ld-%ld]",
-                 iovType->name.c_str(), iovType->type, keyData.first, keyData.second);
+                 iovType->name.c_str(), iovType->type, long(keyData.first), long(keyData.second));
     }
   }
   else  {
-    ::snprintf(text,sizeof(text),"%u:[%ld-%ld]", type, keyData.first, keyData.second);
+    ::snprintf(text,sizeof(text),"%u:[%ld-%ld]", type, long(keyData.first), long(keyData.second));
   }
   return text;
 }