dayjs icon indicating copy to clipboard operation
dayjs copied to clipboard

fix: +00:00 timezone bug

Open DimaBur opened this issue 4 years ago • 2 comments

When we have +00:00 timezone offset like 'Europe/London" dayjs gets users timezone offset, which causes incorrect time showing in different cases.

Example

Current behavior: dayjs('2021-10-31T15:00:00+00:00').tz('Europe/London').format() // 2021-10-31T15:00:00Z

Behavior after fix: dayjs('2021-10-31T15:00:00+00:00').tz('Europe/London').format() // 2021-10-31T15:00:00+00:00

DimaBur avatar Oct 31 '21 16:10 DimaBur

Codecov Report

Merging #1678 (8691b58) into dev (b5a1391) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##               dev     #1678   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          179       179           
  Lines         1996      1997    +1     
  Branches       507       508    +1     
=========================================
+ Hits          1996      1997    +1     
Impacted Files Coverage Δ
src/plugin/utc/index.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b5a1391...8691b58. Read the comment docs.

codecov[bot] avatar Oct 31 '21 16:10 codecov[bot]

Hey @iamkun is there any plan to merge this fix? I'm having the same problem with Europe/London. Thanks

felipehertzer avatar Nov 20 '23 04:11 felipehertzer