0

I am getting UTC time format,I need to change it in Local time of browser.I have tried the following:-

var start_time1= new Date(matchData.results[i].start_time);

where matchData.results[i].start_time is my UTC time i.e. ISODate("2017-03-09T03:30:00Z")

After doing above I am getting:

09:00:00 GMT+0530 (IST)

But what I want is like, if local browser time is 9:00 a.m., it gives me the same, i.e. 9:00 a.m.

Steffi Keran Rani J
  • 3,667
  • 4
  • 34
  • 56
Rupali
  • 93
  • 1
  • 8

1 Answers1

0

Did you just try :

var start_time1 = new Date("2017-03-09T03:30:00Z");

console.log(start_time1)

>>Thu Mar 09 2017 04:30:00 GMT+0100 (Paris, Madrid)

(I'm based in France)

wizopunker
  • 11
  • 2