I have some epoch timestamp, such as 1497881322, 1487513321, ... and so on
I am wondering how can I put a checkbox that if the box is checked, it will be change to local time stamp, otherwise, it will be GMT timestamp
This is what i have so far
for (var i = 0; i < timestamp.length(); i++) {
var ts= new Date(timestamp[i]* 1000)
var gmt = ts.toGMTString()
}
Is there anyway to keep the checkbox is checked, then refresh the whole page, then change the GMT time into local time if user choose local time? If user uncheck the box, the whole page will change back to GMT time
Aucun commentaire:
Enregistrer un commentaire