Facebook的登录API是否根据用户区域中是否使用了DST来更新时区偏移量? [英] Does Facebook's login API update the timezone offset depending on whether DST is used in a user's area?

查看:106
本文介绍了Facebook的登录API是否根据用户区域中是否使用了DST来更新时区偏移量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我输出facebook的用户数据[我的facebook acc] $user = $this->facebook->api('/me'); print_r($user);时,它给出-7,这是正确的,但是它说明了DST生效的时间吗?例如,当DST生效并且我的位置使用DST时,FB是否会相应地更新/更改偏移量?

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的文档解释timezone字段是用户相对于UTC的时区偏移量.

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

目前尚不清楚,但是我通过实验发现,它不一定是用户的 current 偏移量,而是用户上次登录时的偏移量.如果用户更改时区,或者夏令时开始或结束,则直到用户下一次登录时,这才会反映在Facebook数据中.

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.

另请参见此相关问题.

这篇关于Facebook的登录API是否根据用户区域中是否使用了DST来更新时区偏移量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆