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 f64d24f3 Show application end time
f64d24f3 is described below

commit f64d24f3e5f346f80024d99f21c750b1fe8faf59
Author: Sebb <[email protected]>
AuthorDate: Tue Mar 17 16:34:39 2026 +0000

    Show application end time
---
 lib/whimsy/asf/meeting-util.rb    | 8 ++++++--
 www/members/check_invitations.cgi | 3 ++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/lib/whimsy/asf/meeting-util.rb b/lib/whimsy/asf/meeting-util.rb
index 1a933e33..127eb34c 100644
--- a/lib/whimsy/asf/meeting-util.rb
+++ b/lib/whimsy/asf/meeting-util.rb
@@ -463,15 +463,19 @@ module ASF
       self.get_invite_times[:meeting_end]
     end
 
+    # Time is measured from scheduled end of the meeting in which the votes 
were declared
+    def self.applications_end
+      self.get_invite_times[:meeting_end] + APPLICATION_EXPIRY_POST_VOTE_SECS
+    end
+
     # How long remains before applications close?
     # (Time is measured from scheduled end of the meeting in which the votes 
were declared)
     # Returned as hash, e.g. {:hoursremain=>605, :days=>25, :hours=>5}
     # If applications have expired, :hoursremain is negative
     # and :days/:hours are elapsed time since expiry
     def self.application_time_remaining
-      meetingend = self.meeting_end # this is in seconds
       now = DateTime.now.to_time.to_i
-      remain = (meetingend + APPLICATION_EXPIRY_POST_VOTE_SECS - now) / 3600
+      remain = (self.applications_end - now) / 3600
       {hoursremain: remain, days: remain.abs/24, hours: remain.abs%24}
     end
 
diff --git a/www/members/check_invitations.cgi 
b/www/members/check_invitations.cgi
index 50c3f880..014eb12a 100755
--- a/www/members/check_invitations.cgi
+++ b/www/members/check_invitations.cgi
@@ -164,6 +164,7 @@ end
 
 meeting_end = ASF::MeetingUtil.meeting_end
 remain = ASF::MeetingUtil.application_time_remaining
+apps_end = ASF::MeetingUtil.applications_end
 
 # produce HTML output of reports, highlighting ones that have not (yet)
 # been posted
@@ -207,7 +208,7 @@ _html do
         }
         _p do
           if remain[:hoursremain] > 0
-            _b "Applications close in #{remain[:days]} days and 
#{remain[:hours]} hours"
+            _b "Applications close in #{remain[:days]} days and 
#{remain[:hours]} hours at #{Time.at(apps_end)}"
           else
             _b "Applications can no longer be accepted, sorry."
               _ "The meeting ended at 
#{Time.at(meeting_end).getutc.strftime('%Y-%m-%d %H:%M %Z')}."

Reply via email to