Skip to content

Get one hour offset when time zone is America/New_York #2837

Open
@evan-lc

Description

@evan-lc

Describe the bug

Test in https://day.js.org/ console

var a = dayjs.tz(undefined, 'America/New_York')
    .set('year',2024)
    .set('month', 8)
    .set('date', 27)
    .set('hour',3)
    .set('minute',1)
    .set('second',4)
a.format('YYYY-MM-DD HH:mm:ss z')
dayjs.tz(a.unix()*1000, 'America/New_York').format('YYYY-MM-DD HH:mm:ss z')

Image

Expected behavior

expect dayjs.tz(a.unix()*1000, 'America/New_York').format('YYYY-MM-DD HH:mm:ss z') to be '2024-09-27 03:01:04 EDT'

Information

  • Day.js Version: 1.11.13
  • OS: windows10
  • Browser: 133.0.6943.142
  • Time zone: America/New_York

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