iamkun / iamkun/dayjs

How to display a date/time with its original timezone, instead of displaying localized version

Open
#1,625 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.8k
PR merge metrics
No merged PRs in 30d

Description

This isn't a bug, but I feel I'm misunderstanding something.

Given the date `2021-10-13T16:00:00-07:00`, how can I display it as `October 13, 2021 4:00pm PDT`, i.e. honouring it's specified timezone, without having to provide a timezone name, having it converted to a local date/time, or using UTC?

Contributor guide

Open the contributing guide

Research direction

No file, test, or entry point is named. Start by tracing how the example date is parsed and formatted, then check whether the existing API can preserve its supplied offset. Done means documenting the supported usage for the requested output, or identifying the missing behavior precisely.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
developer-experience
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.