Ghostscript Year 2000 compliance

The following information applies to all releases of the source code of Ghostscript obtained directly from Aladdin's Web pages at since anyone has the right to modify Ghostscript and to distribute source and binaries of the modified versions, the following does not apply to source code obtained elsewhere, or to any binary versions other than those you create from Aladdin's unmodified source code. Also please note that this information is NOT A WARRANTY. Ghostscript is distributed with no warranty of any kind, and this letter does not create one. For more information, please read the file PUBLIC that is distributed with Aladdin Ghostscript and/or the file COPYING that is distributed with GNU Ghostscript.

Date truncation/wraparound problems (so-called "Year 2000" problems) can happen in 4 places in the functioning of software: input, storage, processing, and output.

  1. Ghostscript provides no facilities for inputting dates.

  2. Ghostscript provides no facilities for permanent storage of dates, other than its own build date, which is stored in a 31-bit binary format that is good until approximately 2147. During a single run of the program, it stores the dates that it processes (see #3).

  3. Ghostscript processes dates in only two places: the value returned by the 'status' operator, and the date returned by the %Calendar% IODevice. In both cases, Ghostscript relies on standard C library calls (stat, time, and localtime) and the C 'long' data type to obtain the results. On most systems today, the C 'long' data type is 32 bits wide: on such systems, Ghostscript will return correct values through the year 2037, but starting some time in 2038, the date will roll back to 1903. We expect that long before 2038, the standard C 'long' data type will become 64 bits wide, eliminating the possibility of a problem simply by recompiling Ghostscript from source code. (Ghostscript has already been tested with 64-bit-wide 'long' data, and currently runs that way on some Digital/Compaq and MIPS systems.)

    We would note that although these features (status and %Calendar% IODevice) are part of the documented PostScript language, we have never seen them used for any date-related purpose in any of the thousands of real PostScript files that we have examined since we started business in 1986. (The status operator also serves the purpose of simply testing whether a file exists: we have seen it used for this purpose occasionally.)

    We would also note that the above assumes that the C library is implemented correctly, a factor over which we have no control.

  4. Ghostscript provides no facilities for outputting dates, other than printing its build date when it starts (see #2). It prints the build date with a 4-digit year.

Again, the above is for your information only: it is NOT A WARRANTY. Please do not ask us for additional information: the complete source code is available for your inspection on this Web site.

L. Peter Deutsch
Aladdin Enterprises
6 May 1999