Youtube API 响应片段中 publishedAt 的时区是多少?
What is the timezone of publishedAt in Snippet of Youtube API response?
编辑以也包含 API 响应。
请求API
base = 'https://www.googleapis.com/youtube/v3/videos'
params = {
'part' : 'snippet,contentDetails',
'id': <List of Video IDs>,
'key':gkey
}
response = requests.get(base, params).json()
Sample Snippet
{'publishedAt': ***'2017-11-13T06:06:22Z'***,
'channelId': 'UCDYetMc6gOLkhIiNzFyrJPA',
'title': 'Capítulo 12 | MasterChef 2017',
response['items'][0]['snippet']['publishedAt']
的时区是多少?
我已经搜索了整个文档here
但找不到此关键信息。
提前致谢!!
根据 the docs,任何视频的 publishedAt
属性 都以 ISO 8601 格式给出:
snippet.publishedAt (datetime)
The date and time that the video was published. [...]
The value is specified in ISO 8601 format.
进一步查看引用的 ISO 文档,可以看出指示符 Z
表示 UTC
时区:
Times are expressed in UTC (Coordinated Universal Time), with a special UTC designator ("Z").
编辑以也包含 API 响应。
请求API
base = 'https://www.googleapis.com/youtube/v3/videos'
params = {
'part' : 'snippet,contentDetails',
'id': <List of Video IDs>,
'key':gkey
}
response = requests.get(base, params).json()
Sample Snippet
{'publishedAt': ***'2017-11-13T06:06:22Z'***,
'channelId': 'UCDYetMc6gOLkhIiNzFyrJPA',
'title': 'Capítulo 12 | MasterChef 2017',
response['items'][0]['snippet']['publishedAt']
的时区是多少?
我已经搜索了整个文档here 但找不到此关键信息。
提前致谢!!
根据 the docs,任何视频的 publishedAt
属性 都以 ISO 8601 格式给出:
snippet.publishedAt (datetime)
The date and time that the video was published. [...]
The value is specified in ISO 8601 format.
进一步查看引用的 ISO 文档,可以看出指示符 Z
表示 UTC
时区:
Times are expressed in UTC (Coordinated Universal Time), with a special UTC designator ("Z").