]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/job.c
Support many new attributes and fix some IPP conformance issues (STR #4630)
[thirdparty/cups.git] / scheduler / job.c
index 6605b656de59812cb3774754b7bda5d063a0ab88..1edf585e1caf62d1f1365d78adb979d145393dec 100644 (file)
@@ -4513,6 +4513,7 @@ static void
 set_time(cupsd_job_t *job,             /* I - Job to update */
          const char  *name)            /* I - Name of attribute */
 {
+  char                 date_name[128]; /* date-time-at-xxx */
   ipp_attribute_t      *attr;          /* Time attribute */
   time_t               curtime;        /* Current time */
 
@@ -4527,6 +4528,14 @@ set_time(cupsd_job_t *job,               /* I - Job to update */
     attr->values[0].integer = curtime;
   }
 
+  snprintf(date_name, sizeof(date_name), "date-%s", name);
+
+  if ((attr = ippFindAttribute(job->attrs, date_name, IPP_TAG_ZERO)) != NULL)
+  {
+    attr->value_tag = IPP_TAG_DATE;
+    ippSetDate(job->attrs, &attr, 0, ippTimeToDate(curtime));
+  }
+
   if (!strcmp(name, "time-at-completed"))
   {
     job->completed_time = curtime;