Dynatrace / Dynatrace/backstage-plugin

Render Dates/Timestamps as local string

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
37
Forks
19
Avg merge
4d 11h
Merged PRs (30d)
2

Description

Currently the DQL Frontend Plugin renders anything coming from the backend as-is. This is fine for most data, but for dates and timestamps, Backstage recommends to render them formatted for the locale of the user ([ADR012](https://backstage.io/docs/architecture-decisions/adrs-adr012/)).

To comply with ADR012, we'd need to know that the given column is a date or timestamp and use `Luxon.toLocaleString` to render it accordingly.

This also pulls in the necessity to deal with `null` values when not all entries contain a date or timestamp, something that's currently covered by the DQL query itself (no logic on the Frontend side).

**Bad**

`2023-11-13T14:45:43.278000000Z`

**Good (for German/Austrian Locale)**

`13.11.2023 15:45:43`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.