summaryrefslogtreecommitdiff
path: root/cgi-bin
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2014-05-22 13:54:15 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2014-05-22 13:54:15 +0000
commit554aa7b74970cc720302f38c819a309a5a6ede68 (patch)
tree00034ea1c955312bae68667e5a5c3b0fce920f28 /cgi-bin
parentcf3d4dd6dc3e66f48c6d6453843ffa3eebe7a499 (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.c13
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 :