When I use the Facebook Profile API, the GMT offset I currently get is -7 when in San Francisco.
However, San Francisco is -8. So I believe this is due to a DST off-set.
But how do I get the offset and, therefore, the correct time zone if I am given an inaccurate one from Facebook?
E.g. I cannot use the offset to convert to a timezone to then determine if it is DST because I believe some time zones do not respect DST. So my original solution would fail:
- get time zone from offset
- get period for the timezone
- determine if period is DST or not
- if DST, change the offset, and then determine the time zone again.
Is there a cleaner way to get the time zone using ruby when given the GMT offset that incorporates DST?