Skip to content

Wrong relative time on main cstate page #339

@dumbmoron

Description

@dumbmoron

Describe the bug
After creating an issue with the date parameter set to a UTC timestamp, the main page displays a relative time that is several hours off from the actual date the issue was marked with (e.g. 1h ago for an issue that was made a few minutes ago).

Reproduction steps

  1. Be in a non-GMT+0 timezone
  2. Make an issue with a date in UTC, e.g. date: '2025-05-10T09:27:49.934Z'
  3. Render cstate with this issue
  4. Notice that the issue's relative timestamp is off by GMT+n hours, where n is your timezone's offset

Expected behavior
The relative time should be calculated with the knowledge that the timezone is UTC

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Helium
  • Version: Version 0.0.2.1 (Chromium 136.0.7103.92)

Additional context
It looks to be caused by 0b2ba23, which removed the UTC suffix from the data-date attribute in small.html.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions