Expo Router development server vs production native builds: date object time‑zone preservation in route params
0 reputation · 28 Jul 2021, 20:42 UTC
Goal: Determine whether Expo Router preserves the original time zone of JavaScript Date objects when they are transmitted through route parameters in development and production builds.
In development, the Expo CLI server uses the JavaScript Intl API reflecting the host machine’s time zone, while production bundles on iOS and Android rely on native OS APIs for date formatting. Serialization of Date objects via route params may strip the time‑zone offset, creating uncertainty about consistency across environments. No explicit Expo Router configuration exists to retain time‑zone context, leaving it unclear whether the observed discrepancy is expected behavior or requires manual handling.
- Does Expo Router automatically maintain the time‑zone offset of Date objects passed through route parameters in development versus production builds?
- Are there any Expo Router or SDK options to enforce a specific time zone for date serialization when using route params?
- How should developers handle Date objects to guarantee consistent time‑zone representation across dev and prod builds when using Expo Router?