jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/346533 )
Change subject: Replace deprecated method zone() with utcOffset() ...................................................................... Replace deprecated method zone() with utcOffset() Also removed the workaround of making the offset negative since utcOffset now does this correctly. See http://momentjs.com/guides/#/warnings/zone/ Change-Id: I0cecd525ba131a1c32a9ea60f80d269060e022b0 --- M modules/ext.RevisionSlider.Revision.js 1 file changed, 2 insertions(+), 4 deletions(-) Approvals: WMDE-Fisch: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.RevisionSlider.Revision.js b/modules/ext.RevisionSlider.Revision.js index 3f8a5d5..181b2fd 100644 --- a/modules/ext.RevisionSlider.Revision.js +++ b/modules/ext.RevisionSlider.Revision.js @@ -120,10 +120,8 @@ * @return {string} */ formatDate: function ( rawDate ) { - // Moment's offset works "backwards", as the number of minutes - // behind UTC, so we need to make this number negative - var offset = -mw.libs.revisionSlider.userOffset; - return moment( rawDate ).zone( offset ).format( 'LLL' ); + var offset = parseInt( mw.libs.revisionSlider.userOffset ); + return moment( rawDate ).utcOffset( offset ).format( 'LLL' ); }, /** -- To view, visit https://gerrit.wikimedia.org/r/346533 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0cecd525ba131a1c32a9ea60f80d269060e022b0 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/RevisionSlider Gerrit-Branch: master Gerrit-Owner: Tobias Gritschacher <tobias.gritschac...@wikimedia.de> Gerrit-Reviewer: Addshore <addshorew...@gmail.com> Gerrit-Reviewer: Andrew-WMDE <andrew.kos...@wikimedia.de> Gerrit-Reviewer: Jakob <jakob.warkot...@wikimedia.de> Gerrit-Reviewer: Tobias Gritschacher <tobias.gritschac...@wikimedia.de> Gerrit-Reviewer: WMDE-Fisch <christoph.jau...@wikimedia.de> Gerrit-Reviewer: WMDE-leszek <leszek.mani...@wikimedia.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits