pivot-table: Avoid ctime_r() for portability reasons.
[pspp] / src / output / pivot-table.c
index 031656227bfe6b05dfa58b3444f73fa6ae7d893d..924a14cc9b1490eff01f5f50b82ae5c55e31445d 100644 (file)
@@ -1487,8 +1487,11 @@ pivot_table_dump (const struct pivot_table *table, int indentation)
   if (table->date)
     {
       indent (indentation);
-      char buf[26];
-      printf ("date: %s", ctime_r (&table->date, buf));
+
+      struct tm *tm = localtime (&table->date);
+      printf ("date: %d-%02d-%02d %d:%02d:%02d\n", tm->tm_year + 1900,
+              tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min,
+              tm->tm_sec);
     }
 
   indent (indentation);