Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOES NOT HANDLE NEW ZEALAND TIMEZONE / LOCALE #166

Open
scotartt opened this issue Aug 6, 2019 · 2 comments
Open

DOES NOT HANDLE NEW ZEALAND TIMEZONE / LOCALE #166

scotartt opened this issue Aug 6, 2019 · 2 comments

Comments

@scotartt
Copy link

scotartt commented Aug 6, 2019

Table of Contents

Expected Behavior

It should display dates in New Zealand correctly.

Current Behavior

If the current location on a local computer is set to a new zealand location, the displayed date in the text field is always +1 day from the selected or entered date. (Yes, I am entering a "6" for "6 August" and it displays a "7").

Possible Solution

No idea. Use locales correctly? Don't use the UTC offset? (NZ is UTC+12).

Steps to Reproduce (for bugs)

  1. Set your local computer's timezone to New Zealand Standard Time (UTC +12), e.g. set "Auckland" as location on a Mac.

  2. Go to Demo site http://pushtell.github.io/react-bootstrap-date-picker/

  3. Select a date from the date picker

  4. Notice the displayed date in the date picker is +1 from the selected date.

I've confirmed in my own implementation of the component that the underlying time and date I get back from the component is correct (wtf?) but the date display in the field is incorrect.

This is true even if you type the date!

IT did my head in when the users in our New Zealand airports reported this issue (on their iPads) but I've verified it in both iPads, and on my Mac on Chrome and Safari and the issue is trivially reproduced on your demo site.

Context

OMG we are an airline and I'm ripping this component straight out.

Your Environment

  • Version used: ^5.1.0
  • Browser Name and version: Safari Mac, Safari iOS, Chrome.
  • Operating System and version (desktop or mobile): iOS 11 & 12, macOS 10.14.6
  • Link to your project: sorry, not public, aviation security related, but it breaks on your demo site in the exact same way.
@scotartt
Copy link
Author

scotartt commented Aug 6, 2019

FYI. the following fields on the demo site do work correctly:

Screenshot 2019-08-06 16 04 36

Screenshot 2019-08-06 16 04 14

That is, they display the selected date.

@scotartt
Copy link
Author

scotartt commented Aug 6, 2019

But, for example, these ones do NOT work correctly and have the same exhibited behaviour as I've seen in my own app:

Screenshot 2019-08-06 16 07 32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant