Twitter's user timeline API is giving me timezone information in its response payload in two different ways - utc_offset
(integer) and time_zone
(string)
e.g. "utc_offset": -18000, "time_zone": "Eastern Time (US & Canada)",
I intend to store timezone string field in PostgreSQL via my Spring application and want to be able to derive the correct timestamp later using the same.
That would mean I should be able to parse the time_zone
field to obtain the timezone information but its format doesn't adhere to what java.util.TimeZone
expects. I tried it and because its unable to parse the above format, it falls back to UTC.
Is there a java library that understands the format given by twitter? Its hard to imagine that Twitter will use a non-standard timezone format in its feed.
NOTE:- I am looking for pure Java based solution and not Rails