Skip to content

set doesnt work with TZDate #55

@nik-webdevelop

Description

@nik-webdevelop

My local timezone is UTC+3

const tzDate = new TZDate(date, 'Etc/GMT');
// tzDate: 2025-05-12T13:13:29.697Z
const updatedDate = set(date, { hours: 9, minutes: 0, seconds: 0, milliseconds: 0 });
// updatedDate: 2025-05-12T06:00:00.000Z

I expect updatedDate to have 9 hours, as I set the number of hours to the existing date, stripped of any knowledge of time zones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions