Draft
Handle qcodes timestamp timezone format change and render timestamps in local time#467
Conversation
Co-authored-by: astafan8 <15662810+astafan8@users.noreply.github.com>
Co-authored-by: astafan8 <15662810+astafan8@users.noreply.github.com>
Copilot
AI
changed the title
Handle qcodes timestamp timezone format change and render timestamps in local timezone
Handle qcodes timestamp timezone format change and render timestamps in local time
Aug 24, 2026
Copilot created this pull request from a session on behalf of
astafan8
August 24, 2026 08:27
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upcoming qcodes changes the default render format of
run_timestamp()/completed_timestamp()(andraw_time_to_str_time) from"%Y-%m-%d %H:%M:%S"to"%Y-%m-%d %H:%M:%S%z", so timestamps now carry the local UTC offset (e.g.2026-07-31 10:27:25+0200). This audits where plottr consumes those strings and ensures rendered timestamps use the machine's local timezone.Changes
_split_timestamp(plottr/data/qcodes_dataset.py): converts timezone-aware timestamps to the local (PC) timezone viadatetime.astimezone()before formatting, drops the offset from the split date/time, and handles both legacy and%zformats; returns('', '')on any parse/convert error.test_get_ds_info(test/pytest/test_qcodes_data.py): previously sliced the raw string (ts[11:]), which now includes+0200and mismatchesget_ds_info(). Reuses_split_timestampto build expected values.Notes on impact
Started:/Finished:) passes the raw qcodes string through, so it will now display the offset suffix — accurate and already local; left unchanged._qcodes_db_overview.py::_format_timestamprenders from raw unix floats viadatetime.fromtimestamp(local time) and is unaffected.