0

I have a problem with a DateTime conversion. I have variables which represents a DateTime in milliseconds. If I print them I will get this values:

console.log(test1343[0][0].date);
console.log(test1343[0][1].date);

1475676478000

1475676471000

Now if I convert these values to an date:

console.log(new Date(test1343[0][0].date));
console.log(new Date(test1343[0][1].date));

I get:

Wed Oct 05 2016 16:07:58 GMT+0200

Wed Oct 05 2016 16:07:51 GMT+0200

Now if i convert these values to JSON:

console.log(temp1.toJSON());
console.log(temp2.toJSON());

I will get a time shift of two hours.

2016-10-05T14:07:58.000Z

2016-10-05T14:07:51.000Z

Can someone tell me how to delete this time shift?

Gz Markus

markus321
  • 1
  • 1

0 Answers0