-#if defined(PNG_TIME_RFC1123_SUPPORTED)
-/* Convert the supplied time into an RFC 1123 string suitable for use in
- * a "Creation Time" or other text-based time string.
- */
-png_charp
-png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
-{
- static PNG_CONST char short_months[12][4] =
- {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
-
- if (png_ptr->time_buffer == NULL)
- {
- png_ptr->time_buffer = (png_charp)png_malloc(png_ptr, (png_uint_32)(29*
- sizeof(char)));
- }
-
-#ifdef USE_FAR_KEYWORD
- {
- char near_time_buf[29];
- sprintf(near_time_buf, "%d %s %d %02d:%02d:%02d +0000",
- ptime->day % 31, short_months[ptime->month - 1],
- ptime->year, ptime->hour % 24, ptime->minute % 60,
- ptime->second % 61);
- png_memcpy(png_ptr->time_buffer, near_time_buf,
- 29*sizeof(char));
- }
-#else
- sprintf(png_ptr->time_buffer, "%d %s %d %02d:%02d:%02d +0000",
- ptime->day % 31, short_months[ptime->month - 1],
- ptime->year, ptime->hour % 24, ptime->minute % 60,
- ptime->second % 61);
-#endif
- return ((png_charp)png_ptr->time_buffer);
-}
-#endif /* PNG_TIME_RFC1123_SUPPORTED */
-