Google Cal API Python:创建不考虑时区设置的日历

发布于 2024-12-09 01:30:34 字数 866 浏览 4 评论 0原文

当我尝试创建新日历时,使用适用于 Google 日历的 Google API 时遇到了一些问题。 实际上,不考虑日历的时区,日历是创建的,但时区是默认的。 日历的“选定”选项也是如此。

代码:

time_zone = 'Europe/Paris'
calendar = gdata.calendar.data.CalendarEntry()
calendar.title = atom.data.Title(text='testMaj1')
calendar.timezone = gdata.calendar.data.TimeZoneProperty(value=time_zone)
calendar.hidden = gdata.calendar.data.HiddenProperty(value='false')
calendar.selected = gdata.calendar.data.SelectedProperty(value='true')

new_calendar = client.InsertCalendar(new_calendar=calendar)

我搜索了时区的不同可能性,并发现了( http://code.google.com/intl/fr-FR/apis/adwords/docs/developer/adwords_api_timezones.html )欧洲/巴黎,所以我尝试过但没有成功。 我用另一个时区测试,结果是一样的。

我在创建新日历期间没有错误。

如果您对此有一些想法...:)

谢谢

I have a little problem using the Google API for Google calendar when I try to create a new calendar.
Indeed the TimeZone of the calendar is not considered, the calendar is create but the TimeZone is the one by default.
The same thing for the Selected option of the calendar.

The code :

time_zone = 'Europe/Paris'
calendar = gdata.calendar.data.CalendarEntry()
calendar.title = atom.data.Title(text='testMaj1')
calendar.timezone = gdata.calendar.data.TimeZoneProperty(value=time_zone)
calendar.hidden = gdata.calendar.data.HiddenProperty(value='false')
calendar.selected = gdata.calendar.data.SelectedProperty(value='true')

new_calendar = client.InsertCalendar(new_calendar=calendar)

I've search for the different possibilities of timezone and I've found ( http://code.google.com/intl/fr-FR/apis/adwords/docs/developer/adwords_api_timezones.html ) Europe/Paris so I tried it without success.
I test with another timezone and it's the same.

I've no error during the creation of the new calendar.

If you have some idea about this ... :)

Thank's

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文