]> Lady’s Gitweb - Gitweb/commit
gitweb.js: Add UI for selecting common timezone to display dates
authorJohn 'Warthog9' Hawley <redacted>
Thu, 28 Apr 2011 19:04:10 +0000 (21:04 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:51:31 +0000 (00:51 -0400)
commitd0b6c8bc746e60c6639103263dd8f5202a24caafb34ec02f92e61cdd4a1323d6
tree370f7ef674f6dea8cf8a21eb69a3abcd985e1403907aa86bab541739a63e70f3
parente301db1d49799c3f6cce05ac75438cd76254de83cb4675c7b45e9019abcb6306
gitweb.js: Add UI for selecting common timezone to display dates

This will modify HTML, add CSS rules and add DOM event handlers so
that clicking on any date (the common part, not the localtime part)
will display a drop down menu to choose the timezone to change to.

Currently menu displays only the following timezones:

  utc
  local
  -1200
  -1100
  ...
  +1100
  +1200
  +1300
  +1400

In timezone selection menu each timezone is +1hr to the previous.  The
code is capable of handling fractional timezones, but those have not
been added to the menu.

All changes are saved to a cookie, so page changes and closing /
reopening browser retains the last known timezone setting used.

[jn: Changed from innerHTML to DOM, moved to event delegation for
onclick to trigger menu, added close button and cookie refreshing]

Helped-by: Kevin Cernekee <redacted>
Signed-off-by: John 'Warthog9' Hawley <redacted>
Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl
static/gitweb.css
static/js/adjust-timezone.js
static/js/lib/common-lib.js
This page took 0.289164 seconds and 4 git commands to generate.