arqex / arqex/react-datetime

displayTimeZone prop doesn't affect output date

Open
#793 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2k
Forks
858
PR merge metrics
No merged PRs in 30d

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.

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.