-
-
Notifications
You must be signed in to change notification settings - Fork 431
Leading zeros are stripped from Serial Monitor timestamps #580
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
Comments
@per1234 |
@ubidefeo yes: Leading zeros are still stripped from hours: Leading zeros are still stripped from minutes:
|
I think the relevant code affecting this is given here arduino-ide/arduino-ide-extension/src/browser/serial/monitor/serial-monitor-send-output.tsx Lines 110 to 113 in df8658e
Can I go ahead and submit a PR changing it to const timestamp =
(data.timestamp &&
`${dateFormat(data.lines[index].timestamp, 'HH:MM:ss.l')} -> `) ||
''; |
Hi @nmzaheer. Please do. I'll be happy to review it. |
@per1234 I've tested it on Ubuntu through WSL with my Uno board and it works. |
Describe the problem
🐛 The timestamps produced by the Serial Monitor have a non-standard format resulting from stripping the leading zeros from the hours and minutes.
🐛 This is not even done consistently as the leading zeros are preserved for seconds.
To Reproduce
Steps to reproduce the behavior:
🙂 Note that the leading zero on the second component of the time has not been removed.
🐛 Note that the leading zero on the minute component of the time has been removed.
🐛 Note that the leading zero on the hour component of the time has been removed.
Expected behavior
Serial Monitor timestamps to be formatted the same as they were in the classic Arduino IDE:
hh:mm:ss.sss
Arduino IDE version
Original report
2.0.0-beta.12-nightly.20211028
Last verified with
2.0.0-rc9-snapshot-5087ff0
Operating system
Windows 10
Additional context
Originally reported at:
The text was updated successfully, but these errors were encountered: