community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1759922 - /comdev/reporter.apache.org/trunk/site/addrelease.html
Date Thu, 08 Sep 2016 22:45:59 GMT
Author: sebb
Date: Thu Sep  8 22:45:58 2016
New Revision: 1759922

URL: http://svn.apache.org/viewvc?rev=1759922&view=rev
Log:
COMDEV-203 Timezone issues with release dates
Fix Javascript dates to always use UTC.

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=1759922&r1=1759921&r2=1759922&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/addrelease.html (original)
+++ comdev/reporter.apache.org/trunk/site/addrelease.html Thu Sep  8 22:45:58 2016
@@ -59,8 +59,8 @@
      
      function validate(form) {
       var x = document.getElementById('xdate').value.split("-");
-      var y = new Date(x[0],parseInt(x[1])-1,parseInt(x[2]));
-      var nn = parseInt(y.getTime()/1000);
+      // ensure UTC date is used!
+      var nn = Date.UTC(x[0],parseInt(x[1])-1,parseInt(x[2]))/1000;
       document.getElementById('date').value = nn;
       if (isNaN(nn)) {
         alert("Please fill out the release date using YYYY-MMM-DD!")



Mime
View raw message