Closed
Bug 1804738
Opened 3 years ago
Closed 3 years ago
`nsIGleanDatetime.set` says it takes millis, but it takes a PRTime which is nanos
Categories
(Toolkit :: Telemetry, defect, P3)
Toolkit
Telemetry
Tracking
()
RESOLVED
FIXED
110 Branch
| Tracking | Status | |
|---|---|---|
| firefox110 | --- | fixed |
People
(Reporter: chutten, Assigned: chutten)
Details
Attachments
(1 external file)
The docs for nsIGleanDatetime.set say
- @param aValue The time value in milliseconds since epoch. Defaults to local now.
That's not actually true, since it takes a PRTime. As you can see from this test, this means nanoseconds.
We should update the jsdoc, and double-check any other docs and code around that method to double-check that this is an isolated docbug.
Comment 1•3 years ago
|
||
While here, it would be nice if the JSDoc made it clear that the time_unit impacts only the stored resolution, and perhaps guided the user to consider the timezone, which can lead to some surprising results, i.e., day units that have non-zero hours because they are rounded in UTC time and presented in the local timezone.
Summary: nsiGleanDatetime.set says it takes millis, but it takes a PRTime which is nanos → `nsIGleanDatetime.set` says it takes millis, but it takes a PRTime which is nanos
| Assignee | ||
Comment 2•3 years ago
|
||
Updated•3 years ago
|
Assignee: nobody → chutten
Status: NEW → ASSIGNED
Pushed by chutten@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e5194b153264
Update datetime metric jsdoc to clarify time and timezone info r=nalexander DONTBUILD
Comment 4•3 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
status-firefox110:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•