Why this function changing time to indian time. I want to set it as same as written in code. So that I can compare it with current indian time. How can I do that?
const moment = require('moment'); console.log(moment.parseZone('2016-04-12T03:52:57+05:30'))
You will have to parse the date as UTC.
Otherwise, moment will read it as local time.