Page MenuHomePhabricator

'in 7 hours' timestamp is displayed on articles with just started translation
Closed, ResolvedPublic

Description

  1. Start a new translation - click on a paragraph and then leave the article. The started translation will be saved in 'In progress' tab.
  1. Click on 'All translations' - the started translation will be displayed with the timestamp indicating 'in 7 hours'.

3, Changing Preferences-Appearance -Time offset does not affect the translation timestamp.

Note: updates on articles or notifications provide relative time - 2 hours ago, 3,min ago. That relative timestamp is calculated against user local time.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 4 2017, 11:25 PM
Amire80 moved this task from Needs Triage to Bugs on the ContentTranslation board.Jun 26 2017, 6:56 AM
Krinkle added a subscriber: Krinkle.EditedMar 14 2018, 10:32 PM

Seeing the same on Special:ContentTranslation after I followed a grey interwiki link for "espagnol" on English Wikipedia:

For what its worth, both my enwiki and eswiki account use UTC as timezone in Preferences/Appearances, and both wikis also have UTC as default timezone. But I was viewing this on a browser with GMT-0700 (PDT) as operating system timezone.

That seems to be a timezone issue then. Have to see if this can be fixed client side, e.g. https://momentjs.com/docs/#/parsing/utc/

moment( translation.lastUpdateTimestamp, 'YYYYMMDDHHmmss Z' ).fromNow()

But input is like 20171116080713.

Should likely be moment.utc( translation.lastUpdateTimestamp, 'YYYYMMDDHHmmss' ).local().fromNow()

Here is another example of fresh in-progress translation showing wrong timestamp. Seems like confirmation that problem lies in timezone calculations, cause I was in CEST (UTC+2) when this happened.

Arrbee renamed this task from 'in 7 hours' timestamp is displayed on articles with just started translation to [to triage] 'in 7 hours' timestamp is displayed on articles with just started translation.Jul 6 2018, 5:04 PM
Arrbee moved this task from Bugs to Check & Move on the ContentTranslation board.
Pginer-WMF triaged this task as Low priority.Jul 9 2018, 3:26 PM
Pginer-WMF moved this task from Check & Move to Bugs on the ContentTranslation board.
Petar.petkovic renamed this task from [to triage] 'in 7 hours' timestamp is displayed on articles with just started translation to 'in 7 hours' timestamp is displayed on articles with just started translation.Jul 10 2018, 11:51 PM

Change 445043 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Fix "last update" timestamp for translations

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

Petar.petkovic moved this task from Backlog to Doing on the good first bug board.

moment( translation.lastUpdateTimestamp, 'YYYYMMDDHHmmss Z' ).fromNow()

But input is like 20171116080713.
Should likely be moment.utc( translation.lastUpdateTimestamp, 'YYYYMMDDHHmmss' ).local().fromNow()

Submitted patch with this change. Credit to @Nikerabbit.

Change 445043 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Fix "last update" timestamp for translations

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

Etonkovidova updated the task description. (Show Details)Jul 13 2018, 7:25 PM
Arrbee moved this task from QA to Done on the Language-2018-July-September board.Jul 18 2018, 7:17 AM
Pginer-WMF closed this task as Resolved.Jul 18 2018, 10:51 AM