+ StartTime = str_to_utime(start_time);
+ if (StartTime == 0) {
+ ua->error_msg(_("Improper date format: %s\n"), ua->argv[i]);
+ return false;
+ }
+ delta_start = StartTime - jr.StartTime;
+ Dmsg3(200, "ST=%d jr.ST=%d delta=%d\n", (time_t)StartTime,
+ (time_t)jr.StartTime, (time_t)delta_start);
+ jr.StartTime = (time_t)StartTime;
+ jr.SchedTime += (time_t)delta_start;
+ jr.EndTime += (time_t)delta_start;
+ jr.JobTDate += delta_start;
+ /* Convert to DB times */
+ bstrutime(jr.cStartTime, sizeof(jr.cStartTime), jr.StartTime);
+ bstrutime(jr.cSchedTime, sizeof(jr.cSchedTime), jr.SchedTime);
+ bstrutime(jr.cEndTime, sizeof(jr.cEndTime), jr.EndTime);
+ }
+ Mmsg(cmd, "UPDATE Job SET ClientId=%s,StartTime='%s',SchedTime='%s',"
+ "EndTime='%s',JobTDate=%s WHERE JobId=%s",
+ edit_int64(jr.ClientId, ed1),
+ jr.cStartTime,
+ jr.cSchedTime,
+ jr.cEndTime,
+ edit_uint64(jr.JobTDate, ed1),
+ edit_int64(jr.JobId, ed2));
+ if (!db_sql_query(ua->db, cmd.c_str(), NULL, NULL)) {
+ ua->error_msg("%s", db_strerror(ua->db));
+ return false;
+ }