-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Parsing does not use a timezone. Only in format() do I see what I want. It looks a bit weird to me because sometimes I just need a date or timestamp and don't need a format function.
Example
const date = dateTimeParse('2025-01-01T00:00:00', {timeZone: 'Europe/Moscow'});
console.log(date.unix()) // 1735689600
console.log(date.toDate()) // "2025-01-01T00:00:00.000Z"
console.log(date.format()) // "2025-01-01T03:00:00+03:00"
const date2 = dateTimeParse('2025-01-01T00:00:00', {timeZone: 'UTC'});
console.log(date.unix()) // 1735689600
console.log(date.toDate()) // "2025-01-01T00:00:00.000Z"
console.log(date2.format()) // "2025-01-01T00:00:00Z"Metadata
Metadata
Assignees
Labels
No labels