jquery - Create a new Date() in JavaScript with my parameter -


i have following code:

$(function () {     var timestamp = 1443563590; //tue, 29 sep 2015 21:53:10 gmt     var today2 = moment.unix(timestamp).tz('america/new_york').tostring();          alert(today2);     //var dateinnewyork = new date(what should type here?);     //alert(dateinnewyork.gethours()); }); 

and want create new date based on can see above. in future timestamp server, i'll keep current time in new york on client's side, whether has current time set in computer or not. how can create date then? http://jsfiddle.net/b8o5cvdz/5/

not sure understood completely, attempt answer understood:

$(function () {     var timestamp = 1443563590; //tue, 29 sep 2015 21:53:10 gmt     var today2 = moment.unix(timestamp).tz('america/new_york').tostring();      alert(today2);      var dateinnewyork = new date(today2);     alert(dateinnewyork.gethours()); }); 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -