mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
[SyncAnalysisState] Preserve synctime µs
By default, datetime.isoformat() uses different format depending on microseconds - if is equal to 0, microseconds are omitted, but otherwise not. Setting timespec = 'microseconds' ensures the format is the same regardless of current time. Change-Id: Icb1be31eb681247c7e46923cdeabb8f5469c20f0 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/371694 Tested-by: Josip Sokcevic <sokcevic@google.com> Reviewed-by: Joanna Wang <jojwang@google.com> Commit-Queue: Josip Sokcevic <sokcevic@google.com>
This commit is contained in:
parent
e7e20f4686
commit
7ef5b465cd
@ -792,7 +792,7 @@ class SyncAnalysisState:
|
||||
"""
|
||||
self._config = config
|
||||
now = datetime.datetime.utcnow()
|
||||
self._Set("main.synctime", now.isoformat() + "Z")
|
||||
self._Set("main.synctime", now.isoformat(timespec="microseconds") + "Z")
|
||||
self._Set("main.version", "1")
|
||||
self._Set("sys.argv", sys.argv)
|
||||
for key, value in superproject_logging_data.items():
|
||||
|
Loading…
Reference in New Issue
Block a user