-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a unified timestamp format #265
Conversation
When you say "leak", do you mean from a privacy/security perspective that sharing a file which was generated using ROHD could expose information about the person who generated it? From a debuggability perspective, it seems convenient to not have to do timezone math to determine when you generated a file. Is this a typical practice to always use UTC for generated timestamps? Please excuse my ignorance on the topic. |
Yes... although this may sound overly dramatic in the context of ROHD.
Yes, I mentioned the leak, but did not point out the advantages of a single point of reference for processing files. Oops.
It's hard to tell if this is a typical practice, but current timestamps use local time and don't preserve the time zone. If the data crosses time zones, then problems can arise in certain use cases. For example, someone sorts |
It is possible to try to maintain both human convenience and processing accuracy. How about converting timestamps to the form |
I think that's a great compromise, good idea! |
Example:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you!
Description & Motivation
SystemVerilog and VCD will now use ISO 8601 UTC time when generating. Previously, local time was used, which could leak time zone information.
RENAMED:
Use UTC and ISO 8601 for output
->Create a unified timestamp format
UPDATE: During the discussions, @mkorbel1 pointed out the need to preserve the human-readability of the format. The decision was made to leave the display of local time and add a UTC offset to it, which will correctly process timestamps from data coming from different time zones. Suggested timestamp format to use when generating SystemVerilog and VCD:
YYYY-MM-DD hh:mm:ss.sss [+/-]hh:mm
.Related Issue(s)
No.
Testing
Ran
tool/run_checks.sh
, waited for successful completion. Ranexample/example.dart
, checked the output.UPDATE: Added timestamp format test.
Backwards-compatibility
No.
UPDATE: Potentially yes. If someone was tied to the old time format, then he may suffer from a format change.
Documentation
No.
UPDATE: Yes. Documentation for the new utility class
Timestamper
. Included in PR.