iamkun / dayjs

⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API
https://day.js.org
MIT License
47.06k stars 2.31k forks source link

Day.js Timezone Plugin: .tz() Function Not Working in Capacitor WebView on Android and iOS #2747

Open Ruryk opened 1 month ago

Ruryk commented 1 month ago

Bug When using Day.js with the timezone plugin in a Capacitor WebView, an error occurs: "TypeError: Dv(...).tz is not a function."

Expected behaviour The .tz function should correctly process and convert timezones as expected when using the Day.js timezone plugin. The method should allow manipulating and displaying time in different time zones without throwing an error.

Information Day.js Versions: 1.11.13, 1.11.7 Operating System: Android, iOS Capacitor Version: 5.7.8 Environment: Capacitor WebView

This issue persists even after updating to the latest Day.js versions and ensuring all dependencies are properly installed. The same code works as expected in a browser but fails within the Capacitor WebView on both Android and iOS. Screenshots have been attached for further reference.

Screenshots The attached screenshots were captured using chrome://inspect/#devices for remote debugging of the WebView:

image image