From 9be1fe63b4cdfbda6afc1dcce17b44785fa67485 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 5 Nov 2015 15:45:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=8F=91=E5=B8=83=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E7=9A=84=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/course.js | 2 +- public/javascripts/new_user.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 90d085ea3..b015af857 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -663,7 +663,7 @@ function regex_homework_end_publish_time() var myDate = new Date(); if($.trim($("#homework_publish_time").val()) == "") { - $("#homework_publish_time").val(myDate.toLocaleDateString()); + $("#homework_publish_time").val(myDate.getFullYear()+'-'+(myDate.getMonth()+1)+'-'+myDate.getDate()); } var publish_time = Date.parse($("#homework_publish_time").val()); var end_time = Date.parse($("#homework_end_time").val()); diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js index e99abd4f1..4cf380523 100644 --- a/public/javascripts/new_user.js +++ b/public/javascripts/new_user.js @@ -97,7 +97,7 @@ function regex_homework_end_publish_time() var myDate = new Date(); if($.trim($("#homework_publish_time").val()) == "") { - $("#homework_publish_time").val(myDate.toLocaleDateString()); + $("#homework_publish_time").val(myDate.getFullYear()+'-'+(myDate.getMonth()+1)+'-'+myDate.getDate()); } var end_time = Date.parse($("#homework_end_time").val()); var publish_time = Date.parse($("#homework_publish_time").val());