Date format in NodeJS is different to PHP

Hi,

I’m about to recreate my API which I created on IIS/PHP with NodeJS.

I copied the JSON as recommended and it is recognized perfectly in NodeJS. I now found out that there are some differences between NodeJS and PHP.

For example I have a set value for my last data entry.

The exact same properties gives two different formatted results:

api_php
{“lastDate”:“2020-06-29 17:38:52.770”}

api_node
{“lastDate”:“2020-06-29T15:38:52.770Z”}

Is this a bug or does it have to be like that? I could use the formatter, but didn’t have to by now in PHP.

Community Page
Last updated: