Skip to content

Convert request time to local timezone in report

Thomas Kluyver requested to merge fix/report-timestamps-local into master

Description

Recent reports have shown a 1 hour gap between the request time and the job submission time. This is because the request time is in UTC, while the others are all in local time. I think this is an unintended consequence of !943 (merged).

This MR aims to fix this by passing around all timestamps as timezone-aware datetime objects, with the UTC timezone, and converting them to local time for presentation. However, I've left the timestamps we get from Slurm as they are, which seems to be local time.

How Has This Been Tested?

Deployed as xcaltst, run a correction from a CALLAB test run.

Relevant Documents (optional)

This is the report with this fix:

image

And here's a recent report from production, without this fix:

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the code style of this project.

Reviewers

@ahmedk @schmidtp

Merge request reports