问题描述
我试图了解何时转发了一条推文.为此,我学习了如何使用Twitter API和tweetpy.这是我第一次同时使用它们.
I am trying to understand when a tweet is retweeted. To do that I learnt how to use twitter API and tweetpy. This is the first time I use both of them.
通过在末尾使用以下行,我得到了我感兴趣的转发:
I got the retweet I am interested by using the following line at the end:
auth = OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
auth_api = API(auth)
tweetid= # this is the id of the original tweet
auth_api.retweets(tweetid)[0].created_at
现在,当我查看输出时,会看到datetime.datetime(2018, 5, 28, 15, 44, 56)
这个结果.但是,我看不到该时间戳所属的时区.我怎么知道是根据哪个时区写的?
Now, when I look at the output I see datetime.datetime(2018, 5, 28, 15, 44, 56)
this result. However, I cannot see the timezone this timestamp belongs. How can I know that according to which time zone is this written ?
推荐答案
根据 https://developer.twitter.com/en/docs/tweets/data-dictionary/overview/tweet-object created_at
是一个字符串属性,其值为"UTC时间创建此推文的时间."
According to https://developer.twitter.com/en/docs/tweets/data-dictionary/overview/tweet-object created_at
is a string attribute with the value of "UTC time when this Tweet was created."
这篇关于时间戳记在哪个时区上转推的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!