react-native-modal-datetime-picker
react-native-modal-datetime-picker copied to clipboard
[Android] Wrong datetime using 24h format... timezone ?
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
- Android: 12 (emulator), 11 (my real phone)
- iOS: not tested yet :(
- react-native-modal-datetime-picker: 13.1.2
- react-native-community/datetimepicker: 6.3.2
- react-native: 0.69.3
- react: 18.0.0
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:
The onConfirm() event returns the following date:
Thanks you! :)
👋 Please follow https://github.com/mmazzarolo/react-native-modal-datetime-picker#the-component-is-not-working-as-expected-what-should-i-do
👋
Both libraries works fine if use the mode time. This only happens when use the mode datetime. Thanks!
:/ 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.