Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Fix bug in time_per_step (#643)
Browse files Browse the repository at this point in the history
* if time_data_utc is None, print None instead of converting utc_to_local

* Release note

* Added empty line

---------

Co-authored-by: Kevin Tian <kevin.tian@ibm.com>
  • Loading branch information
merav-aharoni and kt474 authored May 30, 2023
1 parent 2075b9c commit 114a216
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion qiskit_ibm_provider/job/ibm_circuit_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,9 @@ def time_per_step(self) -> Optional[Dict]:
if self._time_per_step:
time_per_step_local = {}
for step_name, time_data_utc in self._time_per_step.items():
time_per_step_local[step_name] = utc_to_local(time_data_utc)
time_per_step_local[step_name] = (
utc_to_local(time_data_utc) if time_data_utc else None
)

return time_per_step_local

Expand Down
5 changes: 5 additions & 0 deletions releasenotes/notes/fix_utc_bug-efd3f045e1bbfa5f.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
features:
- |
In 'time_per_step', if 'time_per_step_local' is None, print None, rather than converting
with 'utc_to_local', because this resulted in a bug.

0 comments on commit 114a216

Please sign in to comment.