Skip to content
Snippets Groups Projects

Convert request time to local timezone in report

Merged Thomas Kluyver requested to merge fix/report-timestamps-local into master
1 unresolved thread

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
845 845 'author': author,
846 846 'report_to': report_to,
847 847 'in_folder': folder,
848 'request_time': request_time.strftime("%Y-%m-%dT%H:%M:%S"),
849 'submission_time': submission_time,
848 'request_time': request_time.isoformat(),
  • Thank you, timezones :see_no_evil:

    LGTM

  • merged

  • Thomas Kluyver mentioned in commit 9351c5d4

    mentioned in commit 9351c5d4

  • Karim Ahmed changed milestone to %3.12.6

    changed milestone to %3.12.6

  • Karim Ahmed changed milestone to %3.13.0

    changed milestone to %3.13.0

  • Please register or sign in to reply
    Loading