Does Facebook's login API update the timezone offset depending on whether DST is used in a user's area?

StackOverflow https://stackoverflow.com/questions/22599433

Question

When I output the facebook's user data [my facebook acc's] $user = $this->facebook->api('/me'); print_r($user); it gives -7, which is correct, but does it account for when DST is in effect? like when DST is in effect AND if my location uses DST, does FB update/change the offset accordingly?

[timezone] => -7 [locale] => en_US
Était-ce utile?

La solution

Facebook's documentation explains that the timezone field is the user's timezone offset from UTC.

What it doesn't make clear, but I have found through experimentation, is that it is not necessarily the user's current offset, but it instead it is the offset as of the user's last log in. If the user changes time zones, or daylight saving time begins or ends, that will not be reflected in the Facebook data until the user's next log in.

See also this related question.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top