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

문제

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
도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top