1
我正在使用日历插件,其中我希望Date对象与特定时区一起存储。我正在使用插件moment.js和moment-timezone.js。 (new date(moment.tz(“2012-11-04 01:00:00-04:00”,“America/New_York”).format()));修改时区新日期javascript
获取:Date {Sun Nov 04 2012 05:00:00 GMT+0000}
我需要:Date {Sun Nov 04 2012 05:00:00 GMT-0400}
我使用PhoneGap的图书馆,我需要两个对象的日期。
window.plugins.calendar.createEvent(title, event_location, notes, start_date, end_date, function(message) { }, function(message) { });
插件保存事件在设备的日历,并检测是否该被发送的时区是从设备时区不同,并改变事件的时区。在设备的时区和事件中显示事件的事件时间。
另外,如果你能告诉我,为什么* *你想要一个'Date'对象,我可以尝试提供一种替代。 –