English 中文(简体)
Java 履历
原标题:JavaScript Date CET

i am working on script which creates events in Google Calendar from data in SpreadSheet. Following code creates events in default calendar.

function myFunction() {
  cal = CalendarApp.getDefaultCalendar();
  cal.createEvent(
       Single day , 
      new Date("October 25, 2011 15:00:00 EST"), 
      new Date("October 25, 2011 16:00:00 EST"), 
      {}
  );
  cal.createAllDayEvent( All day , new Date("October 25, 2011"), {});
}

问题在于,它造成了错误的时间。 全天活动当然都是由科索沃创立的。

Single day event with EST timezone code All day event

我猜测,如果使用CET,那就会产生ep角的起步。

function myFunction() {
  cal = CalendarApp.getDefaultCalendar();
  cal.createEvent(
       Single day , 
      new Date("October 25, 2011 15:00:00 CET"), 
      new Date("October 25, 2011 16:00:00 CET"), 
      {}
  );
  cal.createAllDayEvent( All day , new Date("October 25, 2011"), {});
}

“CET时区代码创建的发明”/

日复一日的事件再次是科索沃,不使用任何时间区代码。

Format of Date contructor i found here http://code.google.com/intl/cs-CZ/googleapps/appsscript/class_calendar.html#createEvent

因此,我的问题是,中欧时间的正确准则是什么? 最好能参考这些代码。

最佳回答
问题回答

暂无回答




相关问题
Google Calendar embeds - but won t respond

I successfully embedded the Google Calendar IFRAME, however, without any JS error -- it won t respond to any of my clicks, nor display any events. After double checking the calendar settings and ...

CalDav on Outlook? [closed]

I m looking for a good way to view CalDav calendars within Outlook. I m aware of the OpenConnector project, but have not been happy with it thus far (re: stability issues & difficulty to ...

Java and Google Calendar

I would be shocked if this were immediately answered here, as this is a question specific to the Google Calendar Java API, but I ll put it out there anyway. The tutorials for Google Calendar give a ...

google calendar java api

I have an object of CalendarEntry I know that http://www.google.com/calendar/feeds/example@gmail.com/allcalendars/full is the feed url of all calendars but how I can get this feed url from ...

Developing a Firefox extension for Google Calendar

I am actually not so sure if it is possible but It would be great for me to have a firefox add-on to add/remove/edit/delete for google calendar. Is there any blog entry or a reference documents about ...

热门标签