时间戳记在哪个时区转推上 [英] Which time zone does the timestamps are written on retweets

查看:22
本文介绍了时间戳记在哪个时区转推上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图了解何时转发推文.为此,我学习了如何使用 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."

这篇关于时间戳记在哪个时区转推上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆