As shown in the title, return the specific time corresponding to the unix timestamp:
var time = '1278927966';
//The key is to multiply by 1000, because time is relative to the beginning of 1970, so multiplying by 1000 will go to the current time.
var real_time = new Date(time) * 1000;
document.write(real_time);
The code is very simple to complete the conversion of timestamp.
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn