Answer the question
In order to leave comments, you need to log in
How to decode the date in this format 1493316022?
I give a VKontakte API request using the wall.get method - https://vk.com/dev/wall.get and get data with a date in this format. How to decrypt it?
Answer the question
In order to leave comments, you need to log in
This is the
PHP timestamp :
echo date('r', 1493316022);
// Thu, 27 Apr 2017 18:00:22 +0000
date = new Date(1493316022 * 1000);
console.log(date.toString());
//Thu Apr 27 2017 21:00:22 GMT+0300 (MSK)
To get the date from it in js
new Date(1493316022 * 1000)
The time stamp is specified in seconds and we need it in milliseconds
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question