File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -247,18 +247,29 @@ def assert_argument(arg, arg_name)
247
247
end
248
248
249
249
def fix_job_info_offsets ( job_info )
250
- keys = %w( CreationDate StartDate DueDate CompletedDate ReturnDate AuthorizationDate )
251
- keys . each do |key |
252
- job_info [ key ] = WebUtils . to_utc ( job_info [ key ] )
250
+ top_keys = %w( CreationDate StartDate DueDate CompletedDate ReturnDate AuthorizationDate )
251
+ task_keys = %w( TaskRequestTime )
252
+ job_info = fix_offsets ( job_info , top_keys )
253
+ job_info . Tasks = job_info . Tasks . map do |task_item |
254
+ fix_offsets ( task_item , task_keys )
253
255
end
254
256
job_info
255
257
end
256
258
257
259
def fix_job_list_offsets ( job_list )
258
- job_list . ActiveJobs = job_list . ActiveJobs . map do |job |
259
- fix_job_info_offsets job
260
+ keys = %w( CreationDate CreationTime StartDate StartTime DueDate CompletedDate
261
+ ReturnDate CompletedTime AuthorizationDate )
262
+ job_list . ActiveJobs = job_list . ActiveJobs . map do |job_item |
263
+ fix_offsets ( job_item , keys )
260
264
end
261
265
job_list
262
266
end
267
+
268
+ def fix_offsets ( hash , keys )
269
+ keys . each do |key |
270
+ hash [ key ] = WebUtils . to_utc ( hash [ key ] )
271
+ end
272
+ hash
273
+ end
263
274
end
264
275
end
You can’t perform that action at this time.
0 commit comments