]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/testipp.c
Dates in non-UTF-8 locales did not display correctly (STR #4388)
[thirdparty/cups.git] / cups / testipp.c
index 6303738b749b20f61e3246e82c4689f762efc47e..2540ff4829fd1a0d34c49f0c532fcbecf16613d8 100644 (file)
@@ -940,17 +940,10 @@ print_attributes(ipp_t *ipp,              /* I - IPP request */
 
       case IPP_TAG_DATE :
           {
-           time_t      vtime;          /* Date/Time value */
-           struct tm   *vdate;         /* Date info */
            char        vstring[256];   /* Formatted time */
 
            for (i = 0, val = attr->values; i < attr->num_values; i ++, val ++)
-           {
-             vtime = ippDateToTime(val->date);
-             vdate = localtime(&vtime);
-             strftime(vstring, sizeof(vstring), "%c", vdate);
-             printf(" (%s)", vstring);
-           }
+             printf(" (%s)", _cupsStrDate(vstring, sizeof(vstring), ippDateToTime(val->date)));
           }
           putchar('\n');
           break;