What is the time zone used for tweets in Twitter API?
Asked
Active
Viewed 1.1k times
4 Answers
7
The created_at field for a tweet in the Twitter REST API gives the timestamp in UTC.
If a user has configured their timezone with Twitter, the utc_offset field gives you the difference in seconds between their timezone and UTC. So,
"utc_offset":-28800
corresponds to -28800/3600 = -8 hours from UTC.
There are a couple of suggestions that this doesn't get adjusted for daylight savings.

Liz Rice
- 589
- 6
- 9
6
The timezone of each tweet is automatically converted to the local timezone. If you need UTC, you can use the .ToUniversalTime() method, for example:
myTweet.CreatedDate.ToUniversalTime();

Ricky Smith
- 2,379
- 1
- 13
- 29
-
Thank you Rick. This is useful. – MNVR Jan 26 '11 at 17:17
-
6Note that these days, the REST API returns created_at in UTC – s29 Feb 24 '14 at 00:17
-
I believe that's always been the case. It is .NET that converts the date to local time. – Ricky Smith Feb 25 '14 at 13:39
0
Unfortunately, I think It is impossible. Twitter does not store any information related to local timezone. I found that user.utc_offset are always null.

Slef Ved
- 51
- 1
- 6