So In JS if you do:
new Date().toISOString()
it will give you:
"2021-05-28T07:39:31.401Z"
But in PHP/Carbon (Laravel):
// I passed the same date from js result above
(new \Carbon\Carbon("2021-05-28T07:39:31.401Z"))->toISOString();
will return:
"2021-05-28T07:39:31.401000Z"
- What's the additional three 0 on laravel/php's date?
- Any way I can make JS to return the same format?
Z
with000Z
? It's just milliseconds vs. nanoseconds or something. – Underhill