react-native-modal-datetime-picker icon indicating copy to clipboard operation
react-native-modal-datetime-picker copied to clipboard

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

Open cecicifu opened this issue 2 years ago • 3 comments

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:

Screenshot_2

The onConfirm() event returns the following date:

Screenshot_1

Thanks you! :)

cecicifu avatar Sep 03 '22 18:09 cecicifu

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

mmazzarolo avatar Sep 05 '22 07:09 mmazzarolo

👋

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

image

cecicifu avatar Sep 05 '22 17:09 cecicifu

:/ 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.

mmazzarolo avatar Sep 06 '22 09:09 mmazzarolo