I have these 2 console logs, but they return different times (-2 hours off).
console.log(new Date()) // Date 2015-04-20T15:37:23.000Z console.log(Date()) //
Those are the same time. The string generated by Date() just uses a different timezone, as can be seen from the GMT+0200 (CEST) suffix.
Date()
GMT+0200 (CEST)
So if you need your time string in your local timezone, just use .toString() instead of .toUTCString().
.toString()
.toUTCString()