diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2014-05-22 13:54:15 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2014-05-22 13:54:15 +0000 |
commit | 554aa7b74970cc720302f38c819a309a5a6ede68 (patch) | |
tree | 00034ea1c955312bae68667e5a5c3b0fce920f28 /cgi-bin | |
parent | cf3d4dd6dc3e66f48c6d6453843ffa3eebe7a499 (diff) |
Dates in non-UTF-8 locales did not display correctly (STR #4388)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11889 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'cgi-bin')
-rw-r--r-- | cgi-bin/ipp-var.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/cgi-bin/ipp-var.c b/cgi-bin/ipp-var.c index 764cf8a4d..9682d791e 100644 --- a/cgi-bin/ipp-var.c +++ b/cgi-bin/ipp-var.c @@ -939,7 +939,6 @@ cgiSetIPPObjectVars( *nameptr, /* Pointer into name */ value[16384], /* Value(s) */ *valptr; /* Pointer into value */ - struct tm *date; /* Date information */ fprintf(stderr, "DEBUG2: cgiSetIPPObjectVars(obj=%p, prefix=\"%s\", " @@ -1167,17 +1166,9 @@ cgiSetIPPObjectVars( case IPP_TAG_INTEGER : case IPP_TAG_ENUM : if (strncmp(name, "time_at_", 8) == 0) - { - time_t t; /* Temporary time value */ - - t = (time_t)attr->values[i].integer; - date = localtime(&t); - - strftime(valptr, sizeof(value) - (size_t)(valptr - value), "%c", date); - } + _cupsStrDate(valptr, sizeof(value) - (size_t)(valptr - value), (time_t)ippGetInteger(attr, i)); else - snprintf(valptr, sizeof(value) - (size_t)(valptr - value), - "%d", attr->values[i].integer); + snprintf(valptr, sizeof(value) - (size_t)(valptr - value), "%d", ippGetInteger(attr, i)); break; case IPP_TAG_BOOLEAN : |