i have a date variable like this const date=new Date() and when i console.log this it shows me Tue May 02 2017 11:35:50 GMT+0300 (GTB Daylight Time) which is correct of course. I want to convert this to Iso Date and i'm using toIsoString() function of javascript like this:
const IsoDate = (date.toISOString()).slice(0, -5);
console.log(IsoDate)
but it shows me in the console this: 2017-05-02T08:35:50 It seems that it shows 3 hours before the actual date. Why is this happening?