Page MenuHomePhabricator

Time on New Pages Feed is displayed in browser timezone instead of timezone set in preferences
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?:
Times are in browser time (usually the time of wherever you are). This is the case for both the date/time articles were created and the date/time creating users' accounts were created (the "edit count edits since date").

What should have happened instead?:
Times should be in the timezone you set in Special:Preferences#mw-prefsection-rendering. Preferably, without the extremely large timezone identifier, "GMT±XXXX (name of timezone)".

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I'm pretty sure this is new; at least, I hadn't noticed this before. And it's gigantic; I would have noticed it.

Ohh. It appears PageTriage was also relying on Date.prototype.toString modified by date.js library (which takes a format string). So when the library was removed, we're now seeing the native browser toString() method which produces the ugly output. Looks like there's no way to fix this other than to bring back the deprecated library by reverting rEPTR9772b49b41be . cc @Krinkle

Didn't know client-side date formatting was implemented in such a localized way. About time T21992 (from 2009!) was made a reality.

Change 723581 had a related patch set uploaded (by Legoktm; author: Legoktm):

[mediawiki/extensions/PageTriage@master] Revert \"Remove deprecated date.js library\"

https://gerrit.wikimedia.org/r/723581

Legoktm triaged this task as Unbreak Now! priority.Fri, Sep 24, 5:33 PM

I suspect switching to moment.js is the obvious course of action in the medium term, although it makes sense to revert 9772b49b41be for now. In the long term, core should provide a way to convert a date to the format the user sees in history, contributions, etc. client-side (T21992).

Change 723581 merged by jenkins-bot:

[mediawiki/extensions/PageTriage@master] Revert \"Remove deprecated date.js library\"

https://gerrit.wikimedia.org/r/723581

Change 723583 had a related patch set uploaded (by Legoktm; author: Legoktm):

[mediawiki/extensions/PageTriage@wmf/1.38.0-wmf.1] Revert \"Remove deprecated date.js library\"

https://gerrit.wikimedia.org/r/723583

@Legoktm, thanks for taking care of this!

Change 723583 merged by jenkins-bot:

[mediawiki/extensions/PageTriage@wmf/1.38.0-wmf.1] Revert \"Remove deprecated date.js library\"

https://gerrit.wikimedia.org/r/723583

Mentioned in SAL (#wikimedia-operations) [2021-09-24T18:54:52Z] <legoktm@deploy1002> Synchronized php-1.38.0-wmf.1/extensions/PageTriage/: Revert "Remove deprecated date.js library" (T291675) (duration: 00m 59s)

Legoktm claimed this task.

This should be fixed now.