-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Date instance on eve of the beginning of daylight savings returns hour behind (Android) #21559
Comments
Possibly related to this: https://bugs.webkit.org/show_bug.cgi?id=137003 |
Yes, it seems that it's potentially related to the WebKit - sadly at the moment React Native ships on Android with an old version of the JSC; as workarounds I think you can try using:
With version 0.58 we are planning on making it easier to move to a newer JSC but at the moment is not easily achievable. |
No problem. Thanks @kelset. I'm using DayJS and it still shows the same problem, but I'll give Moment a shot. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
The new JSC landed on master a month ago. |
Environment - react-native info
Other Environment Details
React: 16.5.0
React-native: 0.57.2
Timezone: AEDT - Australian Eastern Daylight Time
Device: Android 8.0 (API 26). Running in emulator (Genymotion). Have briefly tested on device, while it wasn't as thorough, it did show same issue.
Description
Creating a Date instance on the eve of daylight savings starting in Australian Eastern (Daylight) Time returns the hour as an hour behind. Only tested on Android.
The following line is expected to print 20, however it shows 19.
In browser (latest Chrome) and Nodejs (8.11.4) the above line returns 20.
I did further testing with the following timezones using the eve of the respective day light savings date and they did not show the same issue.
Reproducible Demo
The text was updated successfully, but these errors were encountered: