0

I am using Microsoft graph API to get the event and in that event Object I am getting the start and end date like this

"start": {
        "dateTime": "2022-09-17T12:00:00.0000000",
        "timeZone": "UTC"
    },
    "end": {
        "dateTime": "2022-09-17T12:20:00.0000000",
        "timeZone": "UTC"
    },

but it is in UTC

in DB I have this start and end DateTime in IST so I want to match the DB event with the events I am getting from Graph API and for that, I am using the DateTime property for that

I am thinking of first converting the graph API events DateTime property into IST formate and then matching it is there any way to do that

H. Pauwelyn
  • 13,575
  • 26
  • 81
  • 144
  • Does this answer your question? [Convert the time stamp UTC to IST using JavaScript](https://stackoverflow.com/questions/36484862/convert-the-time-stamp-utc-to-ist-using-javascript) – Aaron Meese Sep 22 '22 at 12:10

1 Answers1

-2

I am a signed web developer today and I have great skills in web development. Consider this code snap. I hope this code will help you perfectly.

var dateUTC = new Date("1998-01-10T14:00:00.0000000");
var dateUTC = dateUTC.getTime()
var dateIST = new Date(dateUTC);
dateIST.setHours(dateIST.getHours() + 15);
dateIST.setMinutes(dateIST.getMinutes() + 20);

Cheers!

Tyler2P
  • 2,324
  • 26
  • 22
  • 31