Question about absolute datetime from relative #2906
Zak Siddiqui opened 15 hours ago

2 weeks ago - text - how is this being determined, and how can I find out an actual date and time (in my browser timezone), showing in a her tooltip.

Once investigated, create an issue to do the work

  • Service Desk commented 15 hours ago

    Answered; follow-up for remaining relative-age tooltips tracked in #2907.

  • Service Desk commented 15 hours ago

    Answer

    Relative texts like 2 weeks ago are produced by DateUtils.formatAge(), which uses the PrettyTime library with the current UI locale to turn an absolute instant into a human-readable age.

    Absolute date/time strings come from DateUtils.formatDateTime(), formatted as yyyy-MM-dd HH:mm in the browser timezone. On first page load, OneDev detects that timezone with Intl.DateTimeFormat().resolvedOptions().timeZone and stores it in the web session (BasePageWebSession).

    How to see the absolute time today: On many screens (issue and pull request detail/activities, issue/PR/code-comment lists, contributor dates, etc.), hover the relative age text — the absolute datetime is already shown via a native title tooltip or Tippy (data-tippy-content).

    Gaps: Some relative-age displays still have no absolute hover tooltip (build list and side panel, package list and side panel, workspace list/data, build artifacts, folder last-commit age, comment history/revision titles, and some blame/markdown commit ages). Opened improvement #2907 to add browser-timezone absolute datetime hover tooltips there, and linked it as related.

  • Service Desk changed state to 'Closed' 15 hours ago
    Previous Value Current Value
    Open
    Closed
1/1
Type
Question
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
OD-2906
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover