Skip to content

dayjs timezone is not work in expo app #2864

Open
@SteveYuOWO

Description

@SteveYuOWO
  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
Image

Here's my minimal reproduction
https://github.com/SteveYuOWO/expo-dayjs-reproduction

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