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

[Android] timeZoneOffsetInMinutes issue when setting device timezone to behind 1 day #547

Closed
kenzleong opened this issue Dec 31, 2021 · 1 comment · Fixed by #744
Closed
Labels

Comments

@kenzleong
Copy link

Bug report

Summary

When setting device timezone to behind 1 day of existing timezone and setting timeZoneOffsetInMinutes={0} the Android picker is off by one day.

Reproducible sample code

Using the example project, change the device timezone to Pago GMT -11 (Region: American Samoa).
Set timeZoneOffsetInMinutes={480}

Comment line of code below
//const sourceMoment = moment.unix(1636797600); line 66
with
const sourceMoment = moment();

Steps to reproduce

  1. Click Show Picker

Describe what you expected to happen:

  1. 30th Dec should disabled like IOS

IMG_D675CA663B09-1

Screenshot 2021-12-31 at 16 13 31

Environment info

npx react-native info output:

System:
OS: macOS 11.6.1
CPU: (8) arm64 Apple M1
Memory: 102.17 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.8.0 - ~/.nvm/versions/node/v16.8.0/bin/node
Yarn: Not Found
npm: 7.14.0 - ~/Downloads/datetimepicker-master/node_modules/.bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.2 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
Android SDK: Not Found
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7784292
Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
Languages:
Java: 11.0.12 - /Library/Java/JavaVirtualMachines/jdk-11.0.12.jdk/Contents/Home/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: ^0.66.4 => 0.66.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

datetimepicker version: 5.1.0

iOS / Android version: IOS 14.8 / Android 12

@vonovak
Copy link
Member

vonovak commented Aug 29, 2023

🎉 This issue has been resolved in version 7.5.0 🎉

If this package helps you, consider sponsoring us! 🚀

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

Successfully merging a pull request may close this issue.

2 participants