UPDATED How do I get a UTC Timestamp in JavaScript? -


regarding link , info. :

how utc timestamp in javascript?

i not post update gentleman gave me hint @ done enhance answer:

i send : https://stackoverflow.com/users/376535/shiplu-mokadd-im shiplu.mokadd.im 29.1k33797

you utilizing gettimezoneoffset , gettime,

x = new date() var utcseconds = (x.gettime() + x.gettimezoneoffset()*60*1000)/1000; 

thank timezoneoffset call. made enhancement.

 // 20140922 arf made piece of server side classic asp work.  // prefer moving both sides of equation seconds.  x = new date() var utcseconds = ( (x.gettime()/1000) + (x.gettimezoneoffset()/60) ); return utcseconds 

// sample post

<script language='javascript' runat='server'>    function jsgetutctime() {     //var d = new date();     //return d.toutcstring();      x = new date()     var utcseconds = ( (x.gettime()/1000) + (x.gettimezoneoffset()/60) );     return utcseconds    } </script> <script language='vbscript' runat='server'> function getutctime()     ' use jscript current gmt time stamp     getutctime = jsgetutctime() end function </script>  < % m_utc_time_stamp = getutctime() % > 

i think you're looking this:

unixtimestamp = datediff("s","01/01/1970",now()) * 1000 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -