Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

hoursoffset

GDN_User.HoursOffset (time zone) is apparently set at registration based on browser or ISP location. Two questions, does this field automatically adjust for locations (like Arizona) that don't switch to daylight savings time? And is this field updated per session if user signs on in a different time zone?

Comments

  • ginahoyginahoy New
    edited February 2017

    Thanks for your reply. A non-integer offset is a different issue. Interesting.

    My question relates to how the field is set and (if) updated. Clearly it is set at registration, as I can see evidence of that in the db table. But my questions relate to what, if anything happens after that, either as a result of DST or not, and as a result of signing on from a different time zone.

    The first part of that gets at how it's initially set at registration. If it pulls the timezone from the user's router, then it would theoretically be correct in any timezone if the router is set correctly. The other part relates to whether that field ever gets updated after registration, by whatever method that initialized the field at registration.

  • It gets updated as soon as it changes. The time zone is saved internally as HourOffset for each user. When a user is logged in and visits your forum, the known HourOffset is compared to the current one and if it differs, it gets updated in the User table.

    The only thing you should do is to set the default time zone for guests: $Configuration['Garden']['GuestTimeZone'] = 'Europe/Berlin';. If your current time zone is UTC, you do not have to do this.

Sign In or Register to comment.