dayjs timezone is not work in expo app
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
```
const a = dayjs(new Date(1384775720)).tz("America/Toronto").format("HH:mm:ss");
const b = dayjs(new Date(1384775720)).tz("Asia/Shanghai").format("HH:mm:ss");
```
Put the above code into the nodejs running environment. It shows:
```
{ a: '19:39:35', b: '08:39:35' }
```
And put it into expo app(https://expo.dev/)
it shows:
```
00:39:35
```
Here's my minimal reproduction
https://github.com/SteveYuOWO/expo-dayjs-reproduction
Contributor guide
Research direction
Run the provided snippet in the Node.js environment and then reproduce it in the linked Expo minimal reproduction. Compare the timezone results for America/Toronto and Asia/Shanghai; done means the Expo app produces the same converted times as Node.js.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100