community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1759908 - /comdev/reporter.apache.org/trunk/site/addrelease.html
Date Thu, 08 Sep 2016 21:00:13 GMT
Author: sebb
Date: Thu Sep  8 21:00:13 2016
New Revision: 1759908

URL: http://svn.apache.org/viewvc?rev=1759908&view=rev
Log:
display date as UTC so timezones west of GMT don't display previous date

Modified:
    comdev/reporter.apache.org/trunk/site/addrelease.html

Modified: comdev/reporter.apache.org/trunk/site/addrelease.html
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/addrelease.html?rev=1759908&r1=1759907&r2=1759908&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/addrelease.html (original)
+++ comdev/reporter.apache.org/trunk/site/addrelease.html Thu Sep  8 21:00:13 2016
@@ -74,6 +74,11 @@
        this.date = date;
      }
 
+     // display date as UTC so timezones west of GMT don't display previous date
+     function toUTCDate(date) {
+       return date.toUTCString().substring(0, 16)
+     }
+
      function listReleaseData(json, a,b) {
       if (done) {
         return;
@@ -97,7 +102,8 @@
         recent.sort(function(a,b){return b.date - a.date}); // reverse sort
         for (idx in recent) {
           rel = recent[idx];
-          obj.innerHTML += "- " + rel.version + ": " + new Date(rel.date*1000).toDateString()
+ "<br>"
+          d = new Date(rel.date*1000)
+          obj.innerHTML += "- " + rel.version + ": " + toUTCDate(d) + "<br>"
         }
       }
       document.getElementById('committee').value = committee;



Mime
View raw message