JSFiddle - React, Tailwind, and code Playground
by Tim BĂĽthe
JavaScript
var date = new Date(1308045558 * 1000);
var year = date.getFullYear();
var month = date.getMonth();
var day = date.getDate();
var hour = date.getUTCHours();
var minute = date.getUTCMinutes();
var seconds = date.getUTCSeconds();
alert(year + '-' + month + '-' + day);