Blame gtkmm-osx/libpng-1.2.5/Y2KINFO

Carlos Lopez a09598
   Y2K compliance in libpng:
Carlos Lopez a09598
   =========================
Carlos Lopez a09598
Carlos Lopez a09598
      October 3, 2002
Carlos Lopez a09598
Carlos Lopez a09598
      Since the PNG Development group is an ad-hoc body, we can't make
Carlos Lopez a09598
      an official declaration.
Carlos Lopez a09598
Carlos Lopez a09598
      This is your unofficial assurance that libpng from version 0.71 and
Carlos Lopez a09598
      upward through 1.2.5 are Y2K compliant.  It is my belief that earlier
Carlos Lopez a09598
      versions were also Y2K compliant.
Carlos Lopez a09598
Carlos Lopez a09598
      Libpng only has three year fields.  One is a 2-byte unsigned integer
Carlos Lopez a09598
      that will hold years up to 65535.  The other two hold the date in text
Carlos Lopez a09598
      format, and will hold years up to 9999.
Carlos Lopez a09598
Carlos Lopez a09598
      The integer is
Carlos Lopez a09598
          "png_uint_16 year" in png_time_struct.
Carlos Lopez a09598
Carlos Lopez a09598
      The strings are
Carlos Lopez a09598
          "png_charp time_buffer" in png_struct and
Carlos Lopez a09598
          "near_time_buffer", which is a local character string in png.c.
Carlos Lopez a09598
Carlos Lopez a09598
      There are seven time-related functions:
Carlos Lopez a09598
Carlos Lopez a09598
          png_convert_to_rfc_1123() in png.c
Carlos Lopez a09598
            (formerly png_convert_to_rfc_1152() in error)
Carlos Lopez a09598
          png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c
Carlos Lopez a09598
          png_convert_from_time_t() in pngwrite.c
Carlos Lopez a09598
          png_get_tIME() in pngget.c
Carlos Lopez a09598
          png_handle_tIME() in pngrutil.c, called in pngread.c
Carlos Lopez a09598
          png_set_tIME() in pngset.c
Carlos Lopez a09598
          png_write_tIME() in pngwutil.c, called in pngwrite.c
Carlos Lopez a09598
Carlos Lopez a09598
      All appear to handle dates properly in a Y2K environment.  The
Carlos Lopez a09598
      png_convert_from_time_t() function calls gmtime() to convert from system
Carlos Lopez a09598
      clock time, which returns (year - 1900), which we properly convert to
Carlos Lopez a09598
      the full 4-digit year.  There is a possibility that applications using
Carlos Lopez a09598
      libpng are not passing 4-digit years into the png_convert_to_rfc_1123()
Carlos Lopez a09598
      function, or that they are incorrectly passing only a 2-digit year
Carlos Lopez a09598
      instead of "year - 1900" into the png_convert_from_struct_tm() function,
Carlos Lopez a09598
      but this is not under our control.  The libpng documentation has always
Carlos Lopez a09598
      stated that it works with 4-digit years, and the APIs have been
Carlos Lopez a09598
      documented as such.
Carlos Lopez a09598
Carlos Lopez a09598
      The tIME chunk itself is also Y2K compliant.  It uses a 2-byte unsigned
Carlos Lopez a09598
      integer to hold the year, and can hold years as large as 65535.
Carlos Lopez a09598
Carlos Lopez a09598
      zlib, upon which libpng depends, is also Y2K compliant.  It contains
Carlos Lopez a09598
      no date-related code.
Carlos Lopez a09598
Carlos Lopez a09598
Carlos Lopez a09598
         Glenn Randers-Pehrson
Carlos Lopez a09598
         libpng maintainer
Carlos Lopez a09598
         PNG Development Group