Developer console timestamp only shows time, not date
Categories
(DevTools :: Console, enhancement, P3)
Tracking
(firefox138 fixed)
| Tracking | Status | |
|---|---|---|
| firefox138 | --- | fixed |
People
(Reporter: hrdubwd, Assigned: joshua.obrien, Mentored)
Details
(Whiteboard: [lang=js])
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0
Steps to reproduce:
Open Error Console, Show Timestamp is on.
Actual results:
Only clock time shows.
Expected results:
Date should be prepended.
If TB is active for a long period (mine can be for many days), it is not possible to work out when something happened.
Updated•9 months ago
|
Comment 1•9 months ago
|
||
Would it be enough to put the date as a title of the timestamp? Or I guess we could try to only display the full date when the message was emitted another day than the current one, so we wouldn't waste too much space in the most common case.
The timestamp is rendered in https://searchfox.org/mozilla-release/rev/0b40e2935f3edfdd97e9d1a0b70dd87b9137248d/devtools/client/webconsole/components/Output/Message.js#213-224
renderTimestamp() {
if (!this.props.timestampsVisible) {
return null;
}
return dom.span(
{
className: "timestamp devtools-monospace",
},
l10n.timestampString(this.props.timeStamp || Date.now())
);
}
| Reporter | ||
Comment 2•9 months ago
|
||
Inserting the date just at or after midnight on its own line would make it clear, it does not have to be on every line.
(Sorry, I am not familiar with the coding, cannot comment.)
Updated•9 months ago
|
Updated•9 months ago
|
| Assignee | ||
Comment 3•8 months ago
|
||
Putting the date as the title sounds like a good approach to me. I'd be happy to work on this.
| Reporter | ||
Comment 4•8 months ago
|
||
VG
Comment 5•8 months ago
|
||
(In reply to Joshua O'Brien from comment #3)
Putting the date as the title sounds like a good approach to me. I'd be happy to work on this.
Great, thanks Joshua! I assigned the bug to you.
If you didn't already, you can go through https://firefox-source-docs.mozilla.org/devtools/index.html to setup the work environment.
Ask any question you have here or on https://chat.mozilla.org/#/room/#devtools:mozilla.org if you want to chat
| Assignee | ||
Comment 6•8 months ago
|
||
| Reporter | ||
Comment 7•8 months ago
|
||
As an aside, I see no problem with ISO date format because it is logical, unambiguous, and consistent with numerical formatting, i.e. decreasing value to the right, as in ordinary decimal format: YYYYMMDDHHMMSS.sss (with or without hyphens)
Universal hard-coded would make sense.
Comment 9•8 months ago
|
||
| bugherder | ||
| Reporter | ||
Comment 10•8 months ago
|
||
Thanks all - I look forward to seeing that.
Description
•