whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Show TZ offset
Date Sat, 04 May 2019 15:31:49 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 4bc8a94  Show TZ offset
4bc8a94 is described below

commit 4bc8a9451d1f224f53e10442e9a1170b9e7348ca
Author: Sebb <sebb@apache.org>
AuthorDate: Sat May 4 16:31:45 2019 +0100

    Show TZ offset
---
 www/members/mentors.cgi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/www/members/mentors.cgi b/www/members/mentors.cgi
index eca438f..df48b78 100755
--- a/www/members/mentors.cgi
+++ b/www/members/mentors.cgi
@@ -77,11 +77,13 @@ _html do
     ) do
       _div.panel_group id: MENTORS_LIST, role: "tablist", aria_multiselectable: "true" do
         mentors.each_with_index do |(apacheid, mentor), n| # TODO Should we randomize the
default listing?
+          timezone = mentor[MentorFormat::TIMEZONE]
+          offset = TZInfo::Timezone.get(timezone).strftime("%:z")
           _div!.panel.panel_default  id: apacheid do
             _div!.panel_heading role: "tab", id: "#{MENTORS_LIST}h#{n}" do
               _h4!.panel_title do
                 _a!.collapsed role: "button", data_toggle: "collapse",  aria_expanded: "false",
data_parent: "##{MENTORS_LIST}", href: "##{MENTORS_LIST}c#{n}", aria_controls: "#{MENTORS_LIST}c#{n}"
do
-                  _ "#{mentor[MentorFormat::PUBLICNAME]}  (#{apacheid})  Timezone: #{mentor[MentorFormat::TIMEZONE]}
 "
+                  _ "#{mentor[MentorFormat::PUBLICNAME]}  (#{apacheid})  Timezone: #{timezone}
(#{offset}) "
                   _span.glyphicon.glyphicon_chevron_down id: "#{apacheid}-nav"
                   mentor.delete(MentorFormat::PUBLICNAME) # So not re-displayed below
                 end


Mime
View raw message