question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Correct output of timezone ("z") for CET/CEST

See original GitHub issue

Describe the bug When I am formatting the timzone with “z”, I’ll get a GMT+2. The date I am using is 2022-05-22, 11:00am UTC

dayjs(raceDate).locale(locale).format('LT z') // Output "13:00 GMT+2"

Expected behavior I would expect CET or CEST. If I am using the long format instead, it works as expected:

dayjs(raceDate).locale(locale).format('LT zzz') // Output "13:00 Central European Summer Time"

Information

  • Day.js Version: 1.9.7
  • OS: iOS
  • Browser: Safari
  • Time zone: GMT+02:00 CEST

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
kooogecommented, Jun 23, 2021

dupe? #1154

0reactions
audiojamescommented, May 26, 2021

I also came across this same issue, it is caused by setting the locale of Intl.DateTimeFormat to en-US. PR #1499 addresses this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Correct output of timezone ("z") for CET/CEST #1383 - Issuehunt
Describe the bug When I am formatting the timzone with "z", I'll get a GMT+2. The date I am using is 2022-05-22, 11:00am...
Read more >
Handling timezone and DST changes with Python - HackSoft
Working with dates, times, timezones and daylight saving times is never straightforward. In this article we explore how to account for all ...
Read more >
A Tour of Timezones (& Troubles) in R | R-bloggers
We want to make this a proper date-time object, which in R means the ... roll): CCTZ: Unrecognized output timezone: "America/Ypsilanti".
Read more >
Format date in a specific timezone - javascript - Stack Overflow
If you pass moment a time string that includes the desired offset, then it should retain that offset and display the local time...
Read more >
Time Zones - R
('Initially' means before any time-zone functions are used: if TZ is being set to override the OS setting or if the 'try' does...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found