I want a hidden time () that PHP created and stored in our database a few minutes ago when it was captured by our JavaScript after a JSON request.
http://media.queerdio.com/mobileDevice/?uri=nowplaying/1
as you can see, we store time, for example
"airtime":1382526339
what we want to turn into
3 minutes ago
This is what we know.
First we need to run something like this
function convert_time(ts) {
return new Date(ts * 1000)
}
Taking airtime and running it through this function makes this compatible with JavaScript from what I read (I could be wrong) Unix time javascript
Bt, , JavaScript . jQuery, , , , , .