MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/btxz72/what_are_some_javascript_things_beginners_dont/ep5phq8/?context=3
r/javascript • u/[deleted] • May 28 '19
383 comments sorted by
View all comments
Show parent comments
3
Not in the latest version of node LTS apparently. I just tried and I got jan instead of feb:
> new Date(2019, 1, 1, 1, 1, 1); 2019-01-31T19:31:01.000Z
3 u/yitianjian May 28 '19 Did you get January 31? 2 u/the_php_coder May 28 '19 Oh yeah and that too in UTC timezone, not my local one. Turns out this weird behavior is built into nodejs. Almost every other lang I've worked on gives local time by default, looks like I've got a lot to learn! 2 u/onbehalfofthatdude May 28 '19 Local server time wouldn't be that useful
Did you get January 31?
2 u/the_php_coder May 28 '19 Oh yeah and that too in UTC timezone, not my local one. Turns out this weird behavior is built into nodejs. Almost every other lang I've worked on gives local time by default, looks like I've got a lot to learn! 2 u/onbehalfofthatdude May 28 '19 Local server time wouldn't be that useful
2
Oh yeah and that too in UTC timezone, not my local one. Turns out this weird behavior is built into nodejs. Almost every other lang I've worked on gives local time by default, looks like I've got a lot to learn!
2 u/onbehalfofthatdude May 28 '19 Local server time wouldn't be that useful
Local server time wouldn't be that useful
3
u/the_php_coder May 28 '19
Not in the latest version of node LTS apparently. I just tried and I got jan instead of feb: