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

Pregunta

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
¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top