Document creation date.
[pspp] / dump.c
diff --git a/dump.c b/dump.c
index 1b7a8ed8e78c5ddd68affbf69ccc3ede8b55e8fa..212421cb8045f5d330129c1882745abe1ae4388c 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -6,6 +6,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/stat.h>
+#include <time.h>
 #include <unistd.h>
 #include "u8-mbtouc.h"
 
@@ -1138,7 +1139,13 @@ dump_fonts(void)
               printf("<datafile>%s</datafile>\n", get_string());
 
               match_u32_assert(0);
-              get_u32();
+
+              time_t date = get_u32();
+              struct tm tm = *localtime(&date);
+              char s[128];
+              strftime(s, sizeof s, "%a, %d %b %Y %H:%M:%S %z", &tm);
+              printf("<date>%s</date>\n", s);
+
               match_u32_assert(0);
             }
         }