-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
Platform: All, OS: All
My company has employees in different time zones, but since you can only
configure Java to use one timezone, we can only make one group of users see the
"right" time from hudson.
You can detect the timezone from Javascript
(http://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/),
so I suggest the following approach to using a user's timezone:
Detect the browser's timezone on the first page load
Set a cookie with the timezone in it
On subsequent page view, use the timezone stored in the cookie. Fall back to the
system time zone.
- is duplicated by
-
JENKINS-19887 Allow time zone to be set on a per user basis
-
- Resolved
-
- is related to
-
JENKINS-13092 Show also time zone when displaying time
-
- Open
-
The core problem is that each user can have a different timezone. This means that you are annoying the heck out of some people.
Some things to mitigate this include:
1) Using more relative times. These are always useful, though they become stale if the page isn't refreshed or reloaded.
2) Adding timezones to times. (e.g. JENKINS-13092)
Re: detecting from the browser – I like this, but instead of putting it in a cookie, put it in the user's profile if it isn't set there. Some authentication strategies (e.g. OpenID, LDAP, etc.) can have TZ information that can be used – in those cases, it shouldn't be set based on browser's timezone.
Ciao!