Hacker News new | ask | show | jobs
by chaitanya 1349 days ago
You can’t, because JavaScript date objects are just timestamps.

Here’s what I wrote on this (along with a small library to handle this problem): https://lisper.in/javascript-date

1 comments

Interesting, thank you for your work, I might use it in a project.

Edit: looks like I need a date object specifically, so I will go with the timezone conversion method and convert back to timestamp