2011-12-30 96 views
2

我有UTC:1325271847.在此我使用javascript將其轉換爲Fri Dec 30 2011 14:04:07 GMT-0500(東部標準時間)。我想將其轉換回UTC格式。即1325253847.Javascript日期到UTC時間戳

+0

http://stackoverflow.com/questions/948532/how-do-you-convert-a-javascript-date-to-utc – 2011-12-30 19:48:49

+0

謝謝,攝魂!我想我可以從這裏解決。 – aVC 2011-12-30 20:13:01

回答

2
document.write(new Date("Fri Dec 30 2011 14:04:07 GMT-0500 (Eastern Standard Time)").getTime()/1000 + " seconds since 1970/01/01");