You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2016/09/08 22:45:59 UTC
svn commit: r1759922 - /comdev/reporter.apache.org/trunk/site/addrelease.html
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!")