Pythonクライアント用のGoogleCalendarAPIを使用してイベントを挿入しました が、どういうわけか、意図した時間より1時間遅れています。
これがスニペットです。輸入:
import gdata.calendar.data
import gdata.calendar.client
import gdata.acl.data
import atom.data
Googleカレンダーに接続します。
calendar_client = gdata.calendar.client.CalendarClient(source='noApp')
calendar_client.ClientLogin('account@gmail.com', 'password', calendar_client.source)
イベントの作成:
event = gdata.calendar.data.CalendarEventEntry()
date='2012-10-29T18:30:00.001Z' # This is the time of event that I want to insert
event.when.append(gdata.calendar.data.When(start=date))
そして最後に、イベントを挿入します
new_event = calendar_client.InsertEvent(event)
その結果、カレンダーには10月29日の19:30の時刻があり、18:30ではありません。
タイムゾーンを日付変数の「001Z」ではなく「000Z」に変更しようとしましたが、役に立ちませんでした。もちろん、1時間前に引くこともできますが、なぜそうなるのでしょうか。