Closed Bug 1948347 Opened 9 months ago Closed 8 months ago

Developer console timestamp only shows time, not date

Categories

(DevTools :: Console, enhancement, P3)

enhancement

Tracking

(firefox138 fixed)

RESOLVED FIXED
138 Branch
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.

Component: Untriaged → Console
Product: Thunderbird → DevTools
Version: Thunderbird 128 → unspecified

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())
  );
}

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.)

Mentor: nchevobbe
Whiteboard: [lang=js]
Severity: -- → S3
Priority: -- → P3

Putting the date as the title sounds like a good approach to me. I'd be happy to work on this.

VG

(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: nobody → joshua.obrien
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

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.

Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/adb112ec3998 Add date title to timestamps in developer console. r=nchevobbe,devtools-reviewers
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch

Thanks all - I look forward to seeing that.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: