UXCODA
UXCODA

Reputation: 1226

Cannot parse DateTime object from date string with country and daylight time

I cannot parse this string as a DateTime object with luxon. It always comes back as invalid.

Thu Feb 23 2023 16:00:00 GMT+1300 (New Zealand Daylight Time)

It hasnt worked with any of these fromISO, fromHTTP, fromRFC28822 so I suspect it should be converted into another format first.

Upvotes: 1

Views: 51

Answers (1)

UXCODA
UXCODA

Reputation: 1226

DateTime('Thu Feb 23 2023 16:00:00 GMT+1300 (New Zealand Daylight Time)').fromJSDate() worked.

Upvotes: 2

Related Questions