P
P
Pavel Bykov2018-10-26 20:54:55
In contact with
Pavel Bykov, 2018-10-26 20:54:55

How to convert the correct timestamp from vk?

Hello, I ran into such a problem as invalid timestamps for VK, i.e. it gives this (picture below)
L4N8iBr.png
but if you enter this timestamp(1540574997) into the Date object, then this is what happens ...
da970Ig.png
Maybe someone has an idea how vk converts this timstamp to a valid one ...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2018-10-26
@mafof

this is a PHP timestamp, just multiply it by 1000.
https://jsfiddle.net/qhj36uoL/

V
Vladimir Shabliy, 2018-10-26
@vovka3003

Maybe someone has an idea how vk converts this timstamp to valid
This is actually the number of seconds between 01/01/1970 00:00 and today's date/time. And you need to multiply by 1000 if you need milliseconds ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question