A tool to convert Unix time to Universal Time
Demo Effect:
After clicking Convert, change to:
Source:
function calctime2(){ varTime = Window.document.getElementById ("Inptime"). Value;if(Time = ="") {alert ("Time is empty, please re-enter");return; }if(IsDigit (time) = =false) {alert ("Time can only be made up of numbers");return; } document.write (Millisecondsstrtodate (Time * +));} function isdigit(s) { varpatrn=/^[0-9]{1,20}$/;if(!patrn.exec (s))return false return true} function millisecondsstrtodate(str){ varStartYear =1970;varStartmonth =1;varStartDay =1;varD, S;varSep =":"; D =New Date(); D.setfullyear (StartYear, Startmonth, StartDay); D.settime (0); D.setmilliseconds (str); s = d.getyear () +"-"+ (D.getmonth () +1) +"-"+ d.getdate () +" "+ d.gethours () +":"+ d.getminutes () +":"+ D.getseconds ();//alert (d.tolocalestring ()); returnD.tolocalestring ();}
"Test Tool" a tool that converts UNIX time to Universal Time