Skip to content

When simulating a selection in a timezone that is behind the server's timezone, the date appears to be one day behind. #202

@sw0ok

Description

@sw0ok

🐛 Problem Summary

I'm working on a React Native app using a date picker that returns the start and end of a selected day for API requests.

  • The server sends timestamps in the Europe/Vienna timezone (UTC+2).
  • When simulating the client in America/Los_Angeles (UTC-7), the selected range is correct, but the picker visually displays the date as one day earlier.
  • When simulating in Asia/Kolkata (UTC+5:30), the issue does not occur—both logic and display are aligned.

This appears to be a display issue caused by timezone differences, particularly when the local timezone is behind the server's.


🧪 Reproducible Example

To reproduce the issue, I created a minimal Expo app:

yarn create expo-app@latest example
git apply patch.txt

patch.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions