Twitter Realtime Stream, wrong created_at timestamps


#1

Hello,

Whenever we start a realtime api session, the created_at timestamps are all wrong.

For example, a json/tweet from the realtime stream api is at the end of this message.

Now if you go to the direct API call e.g.

https://api.twitter.com/1.1/statuses/show/743055323619950593.json

And if you go the direct tweet https://twitter.com/Check123ARTS/status/742612902746718208

You will notice that even this api is returning the incorrect time (see attached image). Almost all realtime tweets we are getting have incorrect create times. Is this expected behaviour?

We’ve noticed that if we restrict the realtime api by geo coordinates, it will return the correct times, but if we just do keyword searches then it won’t.

Would appreciate any help.

Thanks

{“created_at”:“Wed Jun 15 12:19:29 +0000 2016”,“id”:743055323619950593,“id_str”:“743055323619950593”,“text”:“RT @Check123ARTS: How did an acrobat change Edgar Degas’ work?\nVideo: https://t.co/s6yQ9RKlLp\n#art https://t.co/U7xA3D2D92",“source”:"\u003ca href=“http://twitter.com/download/android” rel=“nofollow”\u003eTwitter for Android\u003c/a\u003e”,“truncated”:false,“in_reply_to_status_id”:null,“in_reply_to_status_id_str”:null,“in_reply_to_user_id”:null,“in_reply_to_user_id_str”:null,“in_reply_to_screen_name”:null,“user”:{“id”:3273524338,“id_str”:“3273524338”,“name”:“Asif Sadruddin”,“screen_name”:“SadruddinAsif”,“location”:“Mississauga, Ontario”,“url”:null,“description”:null,“protected”:false,“verified”:false,“followers_count”:177,“friends_count”:127,“listed_count”:100,“favourites_count”:679,“statuses_count”:4872,“created_at”:“Sun May 17 13:55:53 +0000 2015”,“utc_offset”:null,“time_zone”:null,“geo_enabled”:false,“lang”:“en”,“contributors_enabled”:false,“is_translator”:false,“profile_background_color”:“C0DEED”,“profile_background_image_url”:“http://abs.twimg.com/images/themes/theme1/bg.png",“profile_background_image_url_https”:“https://abs.twimg.com/images/themes/theme1/bg.png”,“profile_background_tile”:false,“profile_link_color”:“0084B4”,“profile_sidebar_border_color”:“C0DEED”,“profile_sidebar_fill_color”:“DDEEF6”,“profile_text_color”:“333333”,“profile_use_background_image”:true,“profile_image_url”:“http://pbs.twimg.com/profile_images/711971337644986368/54quTPwj_normal.jpg”,“profile_image_url_https”:“https://pbs.twimg.com/profile_images/711971337644986368/54quTPwj_normal.jpg”,“profile_banner_url”:“https://pbs.twimg.com/profile_banners/3273524338/1460236162”,“default_profile”:true,“default_profile_image”:false,“following”:null,“follow_request_sent”:null,“notifications”:null},“geo”:null,“coordinates”:null,“place”:null,“contributors”:null,“retweeted_status”:{“created_at”:"Tue Jun 14 07:01:27 +0000 2016”,“id”:742612902746718208,“id_str”:“742612902746718208”,“text”:“How did an acrobat change Edgar Degas’ work?\nVideo: https://t.co/s6yQ9RKlLp\n#art https://t.co/U7xA3D2D92",“source”:"\u003ca href=“http://bufferapp.com” rel=“nofollow”\u003eBuffer\u003c/a\u003e”,“truncated”:false,“in_reply_to_status_id”:null,“in_reply_to_status_id_str”:null,“in_reply_to_user_id”:null,“in_reply_to_user_id_str”:null,“in_reply_to_screen_name”:null,“user”:{“id”:3881683216,“id_str”:“3881683216”,“name”:“Check123 ARTS”,“screen_name”:“Check123ARTS”,“location”:null,“url”:“http://check123.com/",“description”:"1, 2 and 3 minute videos about Art by @check123com - Video Encyclopedia.”,“protected”:false,“verified”:false,“followers_count”:6298,“friends_count”:6846,“listed_count”:107,“favourites_count”:875,“statuses_count”:1605,“created_at”:“Tue Oct 06 15:22:55 +0000 2015”,“utc_offset”:-3600,“time_zone”:“Cape Verde Is.”,“geo_enabled”:false,“lang”:“en”,“contributors_enabled”:false,“is_translator”:false,“profile_background_color”:“000000”,“profile_background_image_url”:“http://abs.twimg.com/images/themes/theme1/bg.png",“profile_background_image_url_https”:“https://abs.twimg.com/images/themes/theme1/bg.png”,“profile_background_tile”:false,“profile_link_color”:“9266CC”,“profile_sidebar_border_color”:“000000”,“profile_sidebar_fill_color”:“000000”,“profile_text_color”:“000000”,“profile_use_background_image”:false,“profile_image_url”:“http://pbs.twimg.com/profile_images/651419354941161473/93v-GmiM_normal.jpg”,“profile_image_url_https”:“https://pbs.twimg.com/profile_images/651419354941161473/93v-GmiM_normal.jpg”,“profile_banner_url”:“https://pbs.twimg.com/profile_banners/3881683216/1444145893”,“default_profile”:false,“default_profile_image”:false,“following”:null,“follow_request_sent”:null,“notifications”:null},“geo”:null,“coordinates”:null,“place”:null,“contributors”:null,“is_quote_status”:false,“retweet_count”:6,“favorite_count”:15,“entities”:{“hashtags”:[{“text”:“art”,“indices”:[76,80]}],“urls”:[{“url”:“https://t.co/s6yQ9RKlLp”,“expanded_url”:“http://www.check123.com/videos/932-edgar-degas-drawing-miss-lala”,“display_url”:“check123.com/videos/932-edg\u2026”,“indices”:[52,75]}],“user_mentions”:[],“symbols”:[],“media”:[{“id”:742612900569874432,“id_str”:“742612900569874432”,“indices”:[81,104],“media_url”:“http://pbs.twimg.com/media/Ck5Kf6AXAAAlNen.jpg”,“media_url_https”:“https://pbs.twimg.com/media/Ck5Kf6AXAAAlNen.jpg”,“url”:“https://t.co/U7xA3D2D92”,“display_url”:“pic.twitter.com/U7xA3D2D92”,“expanded_url”:“http://twitter.com/Check123ARTS/status/742612902746718208/photo/1”,“type”:“photo”,“sizes”:{“large”:{“w”:1280,“h”:720,“resize”:“fit”},“thumb”:{“w”:150,“h”:150,“resize”:“crop”},“medium”:{“w”:1200,“h”:675,“resize”:“fit”},“small”:{“w”:680,“h”:383,“resize”:“fit”}}}]},“extended_entities”:{“media”:[{“id”:742612900569874432,“id_str”:“742612900569874432”,“indices”:[81,104],“media_url”:“http://pbs.twimg.com/media/Ck5Kf6AXAAAlNen.jpg”,“media_url_https”:“https://pbs.twimg.com/media/Ck5Kf6AXAAAlNen.jpg”,“url”:“https://t.co/U7xA3D2D92”,“display_url”:“pic.twitter.com/U7xA3D2D92”,“expanded_url”:“http://twitter.com/Check123ARTS/status/742612902746718208/photo/1”,“type”:“photo”,“sizes”:{“large”:{“w”:1280,“h”:720,“resize”:“fit”},“thumb”:{“w”:150,“h”:150,“resize”:“crop”},“medium”:{“w”:1200,“h”:675,“resize”:“fit”},“small”:{“w”:680,“h”:383,“resize”:“fit”}}}]},“favorited”:false,“retweeted”:false,“possibly_sensitive”:false,“filter_level”:“low”,“lang”:“en”},“is_quote_status”:false,“retweet_count”:0,“favorite_count”:0,“entities”:{“hashtags”:[{“text”:“art”,“indices”:[94,98]}],“urls”:[{“url”:“https://t.co/s6yQ9RKlLp”,“expanded_url”:“http://www.check123.com/videos/932-edgar-degas-drawing-miss-lala”,“display_url”:“check123.com/videos/932-edg\u2026”,“indices”:[70,93]}],“user_mentions”:[{“screen_name”:“Check123ARTS”,“name”:"Check123 ARTS”,“id”:3881683216,“id_str”:“3881683216”,“indices”:[3,16]}],“symbols”:,“media”:[{“id”:742612900569874432,“id_str”:“742612900569874432”,“indices”:[99,122],“media_url”:“http://pbs.twimg.com/media/Ck5Kf6AXAAAlNen.jpg",“media_url_https”:“https://pbs.twimg.com/media/Ck5Kf6AXAAAlNen.jpg”,“url”:“https://t.co/U7xA3D2D92”,“display_url”:“pic.twitter.com/U7xA3D2D92”,“expanded_url”:“http://twitter.com/Check123ARTS/status/742612902746718208/photo/1”,“type”:“photo”,“sizes”:{“large”:{“w”:1280,“h”:720,“resize”:“fit”},“thumb”:{“w”:150,“h”:150,“resize”:“crop”},“medium”:{“w”:1200,“h”:675,“resize”:“fit”},“small”:{“w”:680,“h”:383,“resize”:“fit”}},“source_status_id”:742612902746718208,“source_status_id_str”:“742612902746718208”,“source_user_id”:3881683216,“source_user_id_str”:“3881683216”}]},“extended_entities”:{“media”:[{“id”:742612900569874432,“id_str”:“742612900569874432”,“indices”:[99,122],“media_url”:“http://pbs.twimg.com/media/Ck5Kf6AXAAAlNen.jpg”,“media_url_https”:“https://pbs.twimg.com/media/Ck5Kf6AXAAAlNen.jpg”,“url”:“https://t.co/U7xA3D2D92”,“display_url”:“pic.twitter.com/U7xA3D2D92”,“expanded_url”:“http://twitter.com/Check123ARTS/status/742612902746718208/photo/1”,“type”:“photo”,“sizes”:{“large”:{“w”:1280,“h”:720,“resize”:“fit”},“thumb”:{“w”:150,“h”:150,“resize”:“crop”},“medium”:{“w”:1200,“h”:675,“resize”:“fit”},“small”:{“w”:680,“h”:383,“resize”:“fit”}},“source_status_id”:742612902746718208,“source_status_id_str”:“742612902746718208”,“source_user_id”:3881683216,“source_user_id_str”:“3881683216”}]},“favorited”:false,“retweeted”:false,“possibly_sensitive”:false,“filter_level”:“low”,“lang”:“en”,“timestamp_ms”:"1465993169108”}


#2

What streaming endpoint are you using?


#3

The example you have id=743055323619950593 - which i assume you got from the stream, looks correct "timestamp_ms":"1465993169108" is within a few milliseconds of Wed Jun 15 12:19:29 +0000 2016

743055323619950593 tweet is a retweet of 742612902746718208 - Retweets are treated as their own unique tweet objects - they have their own created_at, user objects, which will be different to the original 742612902746718208 tweet.

If you only want original tweets in your stream - you can check if a tweet object contains retweeted_status and filter those out. Also - All twitter timestamps are in UTC timezone. Hope that helps!


#4

This is Okay. Whenever I am logged In in my Twitter account the time a particular tweet is different to when I am logged out. Surprisingly, the time when logged in is the local time while when logged out, the time is neither UTC not local. Can you help me with this ?


#5

Hi @rimjhimcse1 - could you be a bit more specific and give us actual examples?

Also, are you using any of the Twitter APIs? Note that the goal of this forum is to support developers in their use of the Twitter APIs and we may not be able to help with question related to the Twitter platform that aren’t related to using the Twitter APIs.