google 日历时间未显示正确的开始和结束时间

google calendar time not showing correct start and end time

我正在构建一个 link(以编程方式)来创建一个 google 日历 link。我发现当我以下列格式传递日期时

....&dates=20151005T170000Z/20151007T190000Z&....

我希望它显示 5:00 下午到 7:00 下午,它却显示 1:00 下午到 3:00 下午

这是完整的link:

`https://www.google.com/calendar/render?action=TEMPLATE&text=The+Annual+%20Event&dates=20151005T170000Z/20151007T190000Z&sprop=website:turnaround.org&location=Fairmont+Scottsdale+Princess+7575+East+Princess+Drive+Scottsdale,+AZ+United+States&details&website=https://example.com&pli=1&sf=true&output=xml#eventpage_6'

我唯一的想法是这是一个时区问题,但我在 url 的任何地方都看不到。

您传递的时区为 Z

20151005T170000Z  <-- here at the end of the date/time

The letter Z ("Zulu") indicates Greenwich Mean Time (GMT) or Coordinated Universal Time (see UTC±00:00). They are used in conjunction with military time: for instance, 6:00 a.m. in zone UTC−5 is written "0600R" and spoken "zero six hundred Romeo".

https://support.google.com/calendar/answer/37064?hl=en

Google Calendar uses Coordinated Universal Time (UTC) to help avoid issues with daylight savings time.

When events are created, they're converted into UTC, but you'll always see them in your local time.

If an area switches their time zone, events created before we knew about the change might be in the wrong time zone.

因此请确保所有时间均为 UTC 时间,或者不要在时间上加上 Z,而是将 &ctz=TIMEZONE 添加到 URL。