Fixed bug #8893: eval timesec sets seconds to zero (Thanks to Ralf Hettinger and...
authorErnesto Baschny <ernst@cron-it.de>
Mon, 21 Jun 2010 10:27:00 +0000 (10:27 +0000)
committerErnesto Baschny <ernst@cron-it.de>
Mon, 21 Jun 2010 10:27:00 +0000 (10:27 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-2@8002 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/jsfunc.evalfield.js

index e4d926c..24927f0 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-06-21  Ernesto Baschny  <ernst@cron-it.de>
+
+       * Fixed bug #8893: eval "timesec" sets seconds to zero (Thanks to Ralf Hettinger and Andy Grunwald)
+
 2010-06-19  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #14464: htmlArea RTE: Type of block accumulation if the block is manually selected in Safari
index 6a4f969..c76b12c 100755 (executable)
@@ -470,11 +470,11 @@ function evalFunc_output(type,value,FObj) {
        return theString;
 }
 function evalFunc_getSecs(timeObj)     {
-       return Math.round(timeObj.getUTCSeconds()/1000);
+       return timeObj.getUTCSeconds();
 }
 // Seconds since midnight:
 function evalFunc_getTime(timeObj)     {
-       return timeObj.getUTCHours()*60*60+timeObj.getUTCMinutes()*60+Math.round(timeObj.getUTCSeconds()/1000);
+       return timeObj.getUTCHours() * 60 * 60 + timeObj.getUTCMinutes() * 60 + this.getSecs(timeObj);
 }
 function evalFunc_getYear(timeObj)     {
        return timeObj.getUTCFullYear();