http://www.mediawiki.org/wiki/Special:Code/MediaWiki/99553

Revision: 99553
Author:   jpostlethwaite
Date:     2011-10-11 20:03:31 +0000 (Tue, 11 Oct 2011)
Log Message:
-----------
Fixed a bad variable name. Removed UTC code.

Modified Paths:
--------------
    trunk/extensions/LastModified/modules/lastmodified.js

Modified: trunk/extensions/LastModified/modules/lastmodified.js
===================================================================
--- trunk/extensions/LastModified/modules/lastmodified.js       2011-10-11 
20:00:02 UTC (rev 99552)
+++ trunk/extensions/LastModified/modules/lastmodified.js       2011-10-11 
20:03:31 UTC (rev 99553)
@@ -34,7 +34,7 @@
        
        // Get the current timestamp and remove the milliseconds
        var nowStamp = extensionsLastModifiedGetUtcTimeStamp();
-       //console.log( 'nowStamp: ' + nowStamp );
+       console.log( 'nowStamp: ' + nowStamp );
 
        // Get the difference in the time from when it was last edited.
        var modifiedDifference = nowStamp - lastEdited;
@@ -50,30 +50,15 @@
 /**
  * Get the UTC Timestamp without microseconds
  *
- * @todo
- * - What do we need to do about timezones?
- *
  * @return integer
  */
 function extensionsLastModifiedGetUtcTimeStamp() {
        
        // Get the current Date object
        var now = new Date();
-       //console.log( 'now: ' + now );
+       console.log( 'now: ' + now );
        
        return parseInt( now.getTime() / 1000 );
-
-       // Return the UTC timestamp
-       return parseInt( 
-               Date.UTC( 
-                       now.getUTCFullYear(),
-                       now.getUTCMonth(),
-                       now.getUTCDay(),
-                       now.getUTCHours(),
-                       now.getUTCMinutes(),
-                       now.getUTCSeconds()
-               ) / 1000
-       );
 }
 
 /**
@@ -140,12 +125,12 @@
 
        // Message to return
        var message = '';
-       var lastEdit = modifiedDifference;
+       var myLastEdit = modifiedDifference;
        
        if ( modifiedDifference < 60 ) {
 
                // seconds
-               message = ( mw.msg( 'lastmodified-seconds',  lastEdit ) );
+               message = ( mw.msg( 'lastmodified-seconds',  myLastEdit ) );
                
        }
        else if ( modifiedDifference < 3600 ) {


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to