bun
bun copied to clipboard
Date object parsing from a string is not handled
What version of Bun is running?
1.1.18+5a0b93523
What platform is your computer?
Darwin 23.1.0 x86_64 i386
What steps can reproduce the bug?
Try to convert a date string in the following format into a Javascript Date object.
const d = new Date("Sat 2022-02-26 15:50")
What is the expected behavior?
d
should be 2022-02-26T06:50:00.000Z
(or from whatever the calling code's timezone is)
What do you see instead?
d
is an Invalid Date
Additional information
This works as expected in nodejs, deno, and in the browser.