displayTimeZone prop doesn't affect output date

Open
#793 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, react
Domain
frontend

Research direction

Start with the codesandbox reproduction in src/App.js, especially the usage of the displayTimeZone prop, and compare the rendered date for Europe/London and America/New_York. Trace the component entry point that handles this prop and verify the displayed date changes to the requested timezone while preserving the reproduction steps.

Written by the indexing model from the issue text.

Description

I'm Submitting a ...
[x] Bug report
[ ] Feature request
[?] Support request
Steps to Reproduce
  1. Pass either 'Europe/London' or 'America/New_York' to displayTimeZone prop.
  2. Observe the output date not be affected.
Expected Results

The output date should be displayed in the given timezone.

Actual Results

The output date stays in my local timezone.

Minimal Reproduction of the Problem

Here's a codesandbox displaying the dates. Changing the timezone at the top from 'Europe/London' (for me) to 'America/New_York' does not change the value of the date from GMT+0100 (British Summer Time) to anything else.
https://codesandbox.io/s/27dmd?file=/src/App.js:1088-1103

Other Information (e.g. stacktraces, related issues, suggestions how to fix)

Not sure if this a problem with the library or just my code - any suggestions would be appreciated.

Dominant language
JavaScript
Stars
2k
Forks
858
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from arqex/react-datetime

All issues in arqex/react-datetime

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.