can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[livejournal] r20106: LJSUP-9823: Can't create post if not sel...

Committer: dpetrov
LJSUP-9823: Can't create post if not selected time zone
U   branches/delayed_entries/htdocs/js/entry.js
Modified: branches/delayed_entries/htdocs/js/entry.js
===================================================================
--- branches/delayed_entries/htdocs/js/entry.js	2011-09-22 03:45:46 UTC (rev 20105)
+++ branches/delayed_entries/htdocs/js/entry.js	2011-09-22 04:10:39 UTC (rev 20106)
@@ -66,7 +66,7 @@
 
 function new_post_load(dotime){
 	if(dotime){
-		settime.interval = setInterval(settime, 1000);
+		settime.interval = setInterval(function() { settime(); }, 1000);
 		settime();
 	}
 
@@ -590,7 +590,7 @@
 		}
 	}
 
-	newTime = time || new Date();
+	var newTime = time || new Date();
 	if (!newTime) {
 		return false;
 	}
@@ -599,7 +599,7 @@
 		return false;
 	}
 
-	f.date_ymd_yyyy.value = newTime.getYear() < 1900 ? newTime.getYear() + 1900 : newTime.getYear();
+	f.date_ymd_yyyy.value = newTime.getFullYear() < 1900 ? newTime.getFullYear() + 1900 : newTime.getFullYear();
 	f.date_ymd_mm.selectedIndex = twodigit(newTime.getMonth() + 1);
 	f.date_ymd_dd.value = twodigit(newTime.getDate());
 	if (!newTime) {
@@ -613,7 +613,7 @@
 	var currentdate = document.getElementById('currentdate-date');
 	var cMonth = newTime.getMonth();
 	var cDay = newTime.getDate();
-	var cYear = newTime.getYear() < 1900 ? newTime.getYear() + 1900 : newTime.getYear();
+	var cYear = newTime.getFullYear() < 1900 ? newTime.getFullYear() + 1900 : newTime.getFullYear();
 	currentdate.innerHTML = mNames[cMonth] + " " + cDay + ", " + cYear;
 
 	return false;

Tags: can3p, js, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments