Javascript -- Unix Time to Specific Time Zone -


I am working with a service which gives me broadcast time for television shows in Unix time (midnight From January 1, 1970, in Greenwich, England). I need to convert this to JavaScript in Eastern Standard Time (USA). I need an account for daylight saving time, and for the fact that the client's clock can be set to anything other than the Eastern Standard Time, I'm sure this code has been written before. Can anyone point me towards it?

What you will find It is possible that a specific time zone, but unless your users are in the desired time zone Yes, this will work:

  var date = new date (); Date.SsetTime (Unixtime * 1000);  

The resulting date object will be displayed in the timezone of the computer running the browser:

  window.console.log (date.toString ())  

The yield:

  "Thursday, June 25 2009 09:48:53 GMT-0400 (EDT)"  

Anyway For)


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -