mmazzarolo / react-native-modal-datetime-picker

A React-Native datetime-picker for Android and iOS
MIT License
2.97k stars 397 forks source link

[Android] Wrong datetime using 24h format... timezone ? #657

Open cecicifu opened 2 years ago

cecicifu commented 2 years ago

Environment

System: OS: Windows 10 10.0.19044 CPU: (4) x64 Intel(R) Core(TM) i5-7600K CPU @ 3.80GHz Memory: 6.07 GB / 15.96 GB Binaries: Node: 16.14.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.0.2 - D:\laragon\bin\yarn\bin\yarn.CMD npm: 8.15.1 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: AllowDevelopmentWithoutDevLicense: Enabled AllowAllTrustedApps: Enabled
IDEs: Android Studio: AI-212.5712.43.2112.8609683 Visual Studio: Not Found Languages: Java: javac 16 - C:\Program Files\AdoptOpenJDK\jdk-16.0.0.36-hotspot\bin\javac.EXE npmPackages: @react-native-community/cli: Not Found react: 18.0.0 => 18.0.0 react-native: 0.69.3 => 0.69.3
react-native-windows: Not Found
npmGlobalPackages: react-native: Not Found

Platforms

Android

Versions

Description

Something is wrong with the timezones when I use the datetime mode with 24h format.

If I select the day 23 at 00:50 hours:

Screenshot_2

The onConfirm() event returns the following date:

Screenshot_1

Thanks you! :)

mmazzarolo commented 2 years ago

👋 Please follow https://github.com/mmazzarolo/react-native-modal-datetime-picker#the-component-is-not-working-as-expected-what-should-i-do

cecicifu commented 2 years ago

👋

Both libraries works fine if use the mode time. This only happens when use the mode datetime. Thanks!

image

mmazzarolo commented 2 years ago

:/ not really sure. I would suggest playing with the datetime creation flow locally to determine where the issue is happening. Unfortunately I can't help these days since I'm not using RN anymore.