Parse timezone int to string (timezone name) (facebook api)

后端 未结 2 1418
南旧
南旧 2020-12-04 03:14

How do you convert a timezone from int to string (etc: Europe/Stockholm)?

I\'m using Facebooks PHP api and that returns

2条回答
  •  再見小時候
    2020-12-04 03:49

    How do you convert a timezone from int to string (etc: Europe/Stockholm)?

    You can't. Read "Time Zone != Offset" in the timezone tag wiki.

    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 these posts:

    • Facebook API, timezone and country
    • FaceBook Time zone and Event Times

提交回复
热议问题