Date format in NodeJS is different to PHP


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:

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


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: