title: The user entered date changes when stored in mongodb, how to store it in original state?
body: <p>I am making a practice project on a restaurant website that has an option of table reservation. The date-time entered in the form by the user changes when stored in MongoDB due to the UTC time-saving system of MongoDB. In India, the time is UTC+5:30 so it changes accordingly. How do I modify the time entered by the user so that it can be saved in its original state? I am new to MongoDB and mongoose so I am not well versed with the techniques which can be used.</p>
  <p>Eg: Suppose the user entered the date-time as <strong>26-5-22 8:27 pm</strong></p>
  <p>In mongodb, it saves as <strong>ISO(2022-05-26T14:57:00Z)</strong></p>
  <p>MY js code for MongoDB is below:</p>
  <pre><code>const mongoose = require('mongoose');
  main().catch(err =&gt; console.log(err));
  async function main(){
      await mongoose.connect('mongodb://localhost:27017/HamdansEatery');
  }
  const reservationSchema= new mongoose.Schema({
      fname: String,
      lname: String,
      tel: Number,
      email: String,
      no_of_persons: Number,
      date_time: Date
  })
  
  const Reservation = mongoose.model(&quot;Reservations&quot;,reservationSchema);
  //-----------------------------------------&gt;
  app.post('/reserve_a_table', (req,res) =&gt; {
      let yourData = new Reservation(req.body);
      yourData.save().then(()=&gt;{
          res.send(&quot;Data has been saved successfully!&quot;);
      }).catch(() =&gt; {
          res.status(400).send(&quot;Data not saved due to some issues.&quot;);
      })
  })
  </code></pre>
  <p>The frontend is <strong>HTML</strong> form with (input type = datetime-local)</p>
  <p>I saw some related questions but couldn't find one for a user-entered date and time.
  How should I progress? How can I modify the Date SchemaType such that it can in a way add 5:30hrs while saving in MongoDB so I can get the result I want i.e. time in Indian Standard Time?</p>