From: Ben Pfaff Date: Sat, 27 May 2017 18:14:51 +0000 (-0700) Subject: Document creation date. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp;a=commitdiff_plain;h=860ae7593728a465b1f0d5e443df7e624df9cf30 Document creation date. --- diff --git a/dump.c b/dump.c index 1b7a8ed8e7..212421cb80 100644 --- a/dump.c +++ b/dump.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include "u8-mbtouc.h" @@ -1138,7 +1139,13 @@ dump_fonts(void) printf("%s\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("%s\n", s); + match_u32_assert(0); } } diff --git a/spv-file-format.texi b/spv-file-format.texi index 192c1c3ea1..c5d327407f 100644 --- a/spv-file-format.texi +++ b/spv-file-format.texi @@ -903,8 +903,8 @@ X6 @result{} (00 @math{|} 01) 00 (00 @math{|} 01) (00 @math{|} 01) int[@t{epoch}] byte[@t{decimal}] byte[@t{grouping}] - byte*8 01 - (string[@t{dataset}] string[@t{data file}] i0 int i0)? + (2d 43 1c eb e2 36 1a 3f | 00*8) 01 + (string[@t{dataset}] string[@t{datafile}] i0 int[@t{date}] i0)? int[@t{n-ccs}] string*[@t{n-ccs}] 2e (00 @math{|} 01) (i2000000 i0)? @end format @@ -921,7 +921,7 @@ encoding string is itself encoded in US-ASCII. @code{epoch} is the year that starts the epoch. A 2-digit year is interpreted as belonging to the 100 years beginning at the epoch. The default epoch year is 69 years prior to the current year; thus, in -2017 this field by default contains 1948. In the corpus, @t{epoch} +2017 this field by default contains 1948. In the corpus, @code{epoch} ranges from 1943 to 1948, plus some contain -1. @code{decimal} is the decimal point character. The observed values @@ -932,6 +932,22 @@ are @samp{.} and @samp{,}. @samp{'} (apostrophe), @samp{ } (space), and zero (presumably indicating that digits should not be grouped). +@code{dataset} is the name of the dataset analyzed to produce the +output, e.g.@: @code{DataSet1}, and @code{datafile} the name of the +file it was read from, e.g.@: @file{C:\Users\foo\bar.sav}. The latter +is sometimes the empty string. + +@code{date} is a date, as seconds since the epoch, i.e.@: since +January 1, 1970. Pivot tables within an SPV files often have dates a +few minutes apart, so this is probably a creation date for the tables +rather than for the file. + +Sometimes @code{dataset}, @code{datafile}, and @code{date} are present +and other times they are absent. The reader can distinguish by +assuming that they are present and then checking whether the +presumptive @code{dataset} contains a null byte (a valid string never +will). + @code{n-ccs} is observed as either 0 or 5. When it is 5, the following strings are CCA through CCE format strings. @xref{Custom Currency Formats,,, pspp, PSPP}. Most commonly these are all