r86666 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86665‎ | r86666 | r86667 >
Date:20:35, 21 April 2011
Author:neilk
Status:ok
Tags:
Comment:
use local date rather than UTC, otherwise we will get bizarre results for many places. No convention of using UTC dates on Commons that I know about.
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js
@@ -455,7 +455,7 @@
456456 if ( !mw.isDefined( dateObj ) ) {
457457 dateObj = new Date();
458458 }
459 - dateStr = dateObj.getUTCFullYear() + '-' + pad( dateObj.getUTCMonth() + 1 ) + '-' + pad( dateObj.getUTCDate() );
 459+ dateStr = dateObj.getFullYear() + '-' + pad( dateObj.getMonth() + 1 ) + '-' + pad( dateObj.getDate() );
460460
461461 // ok by now we should definitely have a dateObj and a date string
462462 $j( _this.dateInput ).val( dateStr );

Status & tagging log