This is an automated email from the ASF dual-hosted git repository.

rubys 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 7345a9f  more time zone fixes
     new cfdbdf2  Merge branch 'master' of github.com:apache/whimsy
7345a9f is described below

commit 7345a9fff4f7c412dbe0471c7b9c607e71741fa6
Author: Sam Ruby <[email protected]>
AuthorDate: Sat Apr 18 19:40:12 2020 -0400

    more time zone fixes
---
 www/board/calendar.cgi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/www/board/calendar.cgi b/www/board/calendar.cgi
index 9522a15..023aa87 100755
--- a/www/board/calendar.cgi
+++ b/www/board/calendar.cgi
@@ -30,7 +30,7 @@ if CGI.new.params['format'] == ['txt']
       date = Date.parse(date)
       next if date <= Date.today
       time = base.local_to_utc(Time.parse("#{date}T#{@time}"))
-      @time = (time + rotate.hour).strftime("%H:%M")
+      @time = (base.utc_to_local(time) + rotate.hour).strftime("%H:%M")
       _ '' unless index == 0
       _ time.strftime("*) %a, %d %B %Y, %H:%M UTC")
     end
@@ -51,7 +51,7 @@ _html do
     set to #{@time} #{@zone}, rotating each meeting time by #{rotate} hours.
   }
   
-  if rotate == 0
+  if rotate != 0
     _p.bg_danger %{
       This background color indicate a local time change from the previous
       month.
@@ -76,7 +76,7 @@ _html do
       next if date <= Date.today
 
       time = base.local_to_utc(Time.parse("#{date}T#{@time}"))
-      @time = (time + rotate.hour).strftime("%H:%M")
+      @time = (base.utc_to_local(time) + rotate.hour).strftime("%H:%M")
       timeurl = 'https://www.timeanddate.com/worldclock/fixedtime.html?iso='
 
       _tr do

Reply via email to