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

Localization.getCalendars() gets an incorrect timezone on web #22009

Closed
ericbabbly opened this issue Apr 5, 2023 · 1 comment · Fixed by #22003
Closed

Localization.getCalendars() gets an incorrect timezone on web #22009

ericbabbly opened this issue Apr 5, 2023 · 1 comment · Fixed by #22003
Assignees

Comments

@ericbabbly
Copy link

ericbabbly commented Apr 5, 2023

Minimal reproducible example

https://snack.expo.dev/MlFZ4YUTbA

Summary

Affected platforms: web

Note: I'm in the America/Vancouver timezone, so the output may be different for people in different timezones. To repro this reliably, you must be in the America/Vancouver timezone.

In the above snack, the correct timezone (America/Vancouver) is calculated with getLocalizationAsync and Intl.DateTimeFormat().resolvedOptions().timeZone. When using Localization.getCalendars(), I get America/Adak, which is 2 hours behind my current timezone.

Environment

❯ npx expo-env-info
expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 13.3
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node
      Yarn: 1.22.19 - /opt/homebrew/bin/yarn
      npm: 8.11.0 - ~/.nvm/versions/node/v16.15.1/bin/npm
      Watchman: 2023.01.02.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    IDEs:
      Android Studio: Chipmunk 2021.2.1 Patch 1 Chipmunk 2021.2.1 Patch 1
      Xcode: 14.2/14C18 - /usr/bin/xcodebuild
    npmPackages:
      @expo/webpack-config: ^18.0.1 => 18.0.3 
      expo: ~48.0.10 => 48.0.10 
      react: 18.2.0 => 18.2.0 
      react-dom: 18.2.0 => 18.2.0 
      react-native: 0.71.6 => 0.71.6 
      react-native-web: ~0.18.10 => 0.18.12 
    npmGlobalPackages:
      expo-cli: 6.2.1
    Expo Workflow: managed
@ericbabbly ericbabbly added the needs validation Issue needs to be validated label Apr 5, 2023
@expo-bot expo-bot added needs review Issue is ready to be reviewed by a maintainer and removed needs validation Issue needs to be validated labels Apr 5, 2023
@aleqsio aleqsio self-assigned this Apr 6, 2023
@aleqsio aleqsio added Issue accepted and removed needs review Issue is ready to be reviewed by a maintainer labels Apr 11, 2023
@expo-bot
Copy link
Collaborator

Thank you for filing this issue!
This comment acknowledges we believe this may be a bug and there’s enough information to investigate it.
However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.

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

Successfully merging a pull request may close this issue.

3 participants