Google Cal API Python:创建不考虑时区设置的日历
当我尝试创建新日历时,使用适用于 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论