Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

93
Views
Storing javascript date object in mongodb is different for localhost and cloud hosting

When I tested the code new Date(new Date().setHours(0, 0, 0, 0)) locally, the value is storing like this 2022-06-20T18:30:00.000+00:00, and when I hosted the same in vercel and tried the same and it is storing the date as 2022-05-21T00:00:00.000+00:00.

My requirement is, I want to save the date only in mongodb through node js, for querying and fetching the data based on the date.

How can I store the same date from both localhost and server.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!