How-to format the last login retrieved by the rest api?

I created a simple php module to parse the rest api to get some data usage.
One of the parameters provided by the rest api is the lastlogin. However, It doesn’t seem to be provided on a usable format. I’ve tryed epoc, unixtime, etc… can’t get it to show correctly.

Anyone can point me to the right direction?

Ok folks!
After digging into NextCloud files, I got my answer.
But I don’t understand why this is done like that…
So, In order to get the last login time from api you have to divide the logintime value by 1000 and then you can parse it with the date function to format it.

Wonder why this value is multiplied by 1000.

Maybe because it might be in ms since the unix epoc? Just a good guess… :wink: