this problem with my server timezone? I want to be able to, for example, save the date someone created their account at in MongoDB. So for the createdAt field, I simply use Date.now, it returns my current date + 1 day and 4 hours.
Date.now is utc it's timezone-agnostic point in time it's the right tool for putting stuff in database however, to display it, you probably want local time
Обсуждают сегодня