⚓ T320338 When using {{REVISIONTIMESTAMP:pagename}} in a template, it displayed as local time
Page Menu
Phabricator
Create Task
Maniphest
T320338
When using {{REVISIONTIMESTAMP:pagename}} in a template, it displayed as local time
Closed, Resolved
Public
BUG REPORT
Actions
Edit Task
Edit Related Tasks...
Create Subtask
Edit Parent Tasks
Edit Subtasks
Merge Duplicates In
Close As Duplicate
Edit Related Objects...
Edit Commits
Edit Mocks
Mute Notifications
Protect as security issue
Assigned To
cscott
Authored By
Shizhao
Oct 9 2022, 3:50 AM
2022-10-09 03:50:39 (UTC+0)
Tags
MediaWiki-Parser
(Backlog)
Parsoid
(Bugs & Crashers)
Performance-Team (Radar)
(Watching)
MW-1.40-notes (1.40.0-wmf.25; 2023-02-27)
Referenced Files
None
Subscribers
Aklapper
cscott
Func
Shizhao
tstarling
Description
Steps to replicate the issue
(include links if applicable):
login test.wikipedia.org
Open [[Special:Preferences]]
Goto 'Appearance' tab
Set 'Time offset' as a time zone (non 'Use wiki default (UTC)')
Click 'Save'
Create page, see
. At this point the timestamp displayed by {{REVISIONTIMESTAMP:REVISIONTIMESTAMP test}} is server time
Create another page:
, Content is '{{:REVISIONTIMESTAMP test}}', At this point the timestamp displayed by {{REVISIONTIMESTAMP:REVISIONTIMESTAMP test}} is local time
My test results
('Time offset' as 'Asia/Shanghai', UTC+8):
Content displayed in [[REVISIONTIMESTAMP_test]]:
REVISIONTIMESTAMP with pagename REVISIONTIMESTAMP test: 20221009035405
Content displayed in [[REVISIONTIMESTAMP_test/1]]:
REVISIONTIMESTAMP with pagename REVISIONTIMESTAMP test: 20221009115405
Details
Related Changes in Gerrit:
Subject
Repo
Branch
Lines +/-
parser: Use the actual revision timestamp of the page for messages
mediawiki/core
master
+7
-3
parser: Make the behavior of REVISIONTIMESTAMP consistent
mediawiki/core
master
+1
-1
Customize query in gerrit
Related Objects
Mentions
Mentioned In
T318278: Self-referential Parser::getCachedRevisionObject() doesn't use last saved revision
Mentioned Here
rMW5cb4693772fb: Unify no-arg and 1-arg forms of {{REVISIONTIMESTAMP}} and friends
rMWd08e0cdf209a: CoreMagicVariables/CoreParserFunctions: unify revisiontimestamp & etc
T27720: substitute LOCALTIMESTAMP can differ from REVISIONTIMESTAMP
Event Timeline
Shizhao
created this task.
Oct 9 2022, 3:50 AM
2022-10-09 03:50:39 (UTC+0)
Restricted Application
added a project:
Performance-Team
View Herald Transcript
Oct 9 2022, 3:50 AM
2022-10-09 03:50:40 (UTC+0)
Restricted Application
added a subscriber:
Aklapper
View Herald Transcript
Shizhao
updated the task description.
(Show Details)
Oct 9 2022, 3:55 AM
2022-10-09 03:55:24 (UTC+0)
Shizhao
added a comment.
Oct 9 2022, 4:04 AM
2022-10-09 04:04:47 (UTC+0)
Comment Actions
If edit [[REVISIONTIMESTAMP_test]] again, The {{REVISIONTIMESTAMP:REVISIONTIMESTAMP test}} timestamp displayed after refresh [[REVISIONTIMESTAMP test/1]] is the same as that of [[REVISIONTIMESTAMP_test]], both of which are server time.
After that if you edit [[REVISIONTIMESTAMP test/1]] again, the {{REVISIONTIMESTAMP:REVISIONTIMESTAMP test}} timestamp displayed by [[REVISIONTIMESTAMP test/1]] becomes local time again.
Shizhao
updated the task description.
(Show Details)
Oct 9 2022, 4:10 AM
2022-10-09 04:10:27 (UTC+0)
Shizhao
updated the task description.
(Show Details)
Oct 9 2022, 6:01 AM
2022-10-09 06:01:19 (UTC+0)
Func
subscribed.
Edited
Oct 9 2022, 9:42 AM
2022-10-09 09:42:01 (UTC+0)
Comment Actions
Possible commit that cause this:
d08e0cdf209a764edd550651da551a93139fe64b
The last userAdjust() call didn't supply empty string as the second parameter as $parser->getRevisionTimestamp() does.
Func
removed a project:
MediaWiki-libs-Timestamp
Oct 9 2022, 9:43 AM
2022-10-09 09:43:28 (UTC+0)
gerritbot
added a comment.
Oct 9 2022, 10:01 AM
2022-10-09 10:01:09 (UTC+0)
Comment Actions
Change 840566 had a related patch set uploaded (by Func; author: Func):
[mediawiki/core@master] parser: Make the behavior of REVISIONTIMESTAMP consistent
gerritbot
added a project:
Patch-For-Review
Oct 9 2022, 10:01 AM
2022-10-09 10:01:10 (UTC+0)
Krinkle
assigned this task to
cscott
Oct 10 2022, 3:19 AM
2022-10-10 03:19:06 (UTC+0)
Krinkle
edited projects, added
Parsoid
; removed
MediaWiki-Page-editing
MediaWiki-Parser-Templates
Krinkle
moved this task from
Inbox, needs triage
to
Backlog: Maintenance, non-prioritized
on the
Performance-Team
board.
Krinkle
edited projects, added
Performance-Team (Radar)
; removed
Performance-Team
Krinkle
added subscribers:
cscott
tstarling
PatchDemoBot
added a comment.
Oct 10 2022, 7:47 AM
2022-10-10 07:47:14 (UTC+0)
Comment Actions
Test wiki
created
on
Patch demo
by Shizhao using patch(es) linked to this task:
Shizhao
added a comment.
Edited
Oct 10 2022, 8:03 AM
2022-10-10 08:03:15 (UTC+0)
Comment Actions
PatchDemo seems to have fixed this issue
gerritbot
added a comment.
Oct 12 2022, 4:31 AM
2022-10-12 04:31:03 (UTC+0)
Comment Actions
Change 840566
merged
by jenkins-bot:
[mediawiki/core@master] parser: Make the behavior of REVISIONTIMESTAMP consistent
ReleaseTaggerBot
added a project:
MW-1.40-notes (1.40.0-wmf.6; 2022-10-17)
Oct 12 2022, 5:00 AM
2022-10-12 05:00:38 (UTC+0)
Maintenance_bot
removed a project:
Patch-For-Review
Oct 12 2022, 5:30 AM
2022-10-12 05:30:11 (UTC+0)
Shizhao
added a project:
User-notice
Oct 13 2022, 2:19 AM
2022-10-13 02:19:15 (UTC+0)
JMcLeod_WMF
moved this task from
Needs Triage
to
Bugs & Crashers
on the
Parsoid
board.
Oct 13 2022, 2:04 PM
2022-10-13 14:04:59 (UTC+0)
Quiddity
subscribed.
Oct 13 2022, 7:21 PM
2022-10-13 19:21:25 (UTC+0)
Comment Actions
Hi. Re: Tech News (
User-notice
) - What
wording
would you suggest as the content (I.e. who does it affect, and what do they need to know, and what do they need to do)?
and
When
should it be included (I.e. If it should be in
this Monday's edition
, then we need wording before ~24hours from now when it will be frozen for translation) ? Thanks!
Func
removed a project:
User-notice
Oct 15 2022, 7:06 AM
2022-10-15 07:06:23 (UTC+0)
Comment Actions
I don't think this needs a user notice, it's just a small recent mistake and was fixed quickly. We can even close this if nothing needs to do on the Parsoid side.
Shizhao
added a comment.
Oct 21 2022, 2:55 AM
2022-10-21 02:55:30 (UTC+0)
Comment Actions
There still seems to be some problems. In edit mode, {{REVISIONTIMESTAMP}} displays the current time in the preview and edit notile, not the edit time of the last revision.
see
Func
added a comment.
Oct 21 2022, 3:24 AM
2022-10-21 03:24:18 (UTC+0)
Comment Actions
In
T320338#8334654
@Shizhao
wrote:
There still seems to be some problems. In edit mode, {{REVISIONTIMESTAMP}} displays the current time in the preview and edit notile, not the edit time of the last revision.
I believe this is the expected behaviour, tested on the previous version and that's how the preview works.
Shizhao
added a comment.
Oct 21 2022, 7:33 AM
2022-10-21 07:33:27 (UTC+0)
Comment Actions
在T320338#8334665中,
@Func
写道:
I believe this is the expected behaviour, tested on the previous version and that's how the preview works.
The previous version was not like this. Used {{REVISIONTIMESTAMP}} on edit notice for several years in zhwiki. The problem has only recently occurred. see:
In edit mode, {{ITN-Update}} in edit notice shows "0 seconds ago"
Func
added a comment.
Oct 21 2022, 8:22 AM
2022-10-21 08:22:26 (UTC+0)
Comment Actions
oh, I see, for message parsing like edit notice, it shouldn't be in the current time.
gerritbot
added a comment.
Oct 21 2022, 8:35 AM
2022-10-21 08:35:39 (UTC+0)
Comment Actions
Change 844560 had a related patch set uploaded (by Func; author: Func):
[mediawiki/core@master] parser: Fix revision timestamp when parsing messages
gerritbot
added a project:
Patch-For-Review
Oct 21 2022, 8:35 AM
2022-10-21 08:35:40 (UTC+0)
PatchDemoBot
added a comment.
Oct 24 2022, 3:58 AM
2022-10-24 03:58:39 (UTC+0)
Comment Actions
Test wiki
created
on
Patch demo
by Shizhao using patch(es) linked to this task:
Shizhao
added a comment.
Oct 24 2022, 4:11 AM
2022-10-24 04:11:01 (UTC+0)
Comment Actions
在T320338#8334846中,
@gerritbot
写道:
Change 844560 had a related patch set uploaded (by Func; author: Func):
[mediawiki/core@master] parser: Fix revision timestamp when parsing messages
@Func
see
still the current time
Func
added a comment.
Oct 24 2022, 5:29 AM
2022-10-24 05:29:32 (UTC+0)
Comment Actions
@Shizhao
I only fix for edit notice. for preview, it's an intended change in
5cb4693
by
@cscott
By the way, I am not sure from which version the behaviour of timestamp preview getting different with or without the page name, at least for 1.34 they are the same - current time.
ref:
Func
added a comment.
Oct 24 2022, 5:38 AM
2022-10-24 05:38:59 (UTC+0)
Comment Actions
after the patch, the timestamp will be real revision time in both modes for messages, e.g. edit notices.
Quiddity
unsubscribed.
Oct 24 2022, 6:03 PM
2022-10-24 18:03:24 (UTC+0)
Shizhao
added a comment.
Oct 25 2022, 3:16 AM
2022-10-25 03:16:12 (UTC+0)
Comment Actions
在T320338#8337695中,
@Func
写道:
after the patch, the timestamp will be real revision time in both modes for messages, e.g. edit notices.
thx
Krinkle
moved this task from
Limbo
to
Watching
on the
Performance-Team (Radar)
board.
Jan 26 2023, 7:53 AM
2023-01-26 07:53:09 (UTC+0)
Func
added a comment.
Edited
Feb 24 2023, 2:05 AM
2023-02-24 02:05:05 (UTC+0)
Comment Actions
In
T320338#8334752
@Shizhao
wrote:
The previous version was not like this. Used {{REVISIONTIMESTAMP}} on edit notice for several years in zhwiki. The problem has only recently occurred. see:
In edit mode, {{ITN-Update}} in edit notice shows "0 seconds ago"
Please help to extend the task description, I will extend the commit message.
gerritbot
added a comment.
Feb 24 2023, 4:58 AM
2023-02-24 04:58:19 (UTC+0)
Comment Actions
Change 844560
merged
by jenkins-bot:
[mediawiki/core@master] parser: Use the actual revision timestamp of the page for messages
ReleaseTaggerBot
edited projects, added
MW-1.40-notes (1.40.0-wmf.25; 2023-02-27)
; removed
MW-1.40-notes (1.40.0-wmf.6; 2022-10-17)
Feb 24 2023, 5:00 AM
2023-02-24 05:00:37 (UTC+0)
Maintenance_bot
removed a project:
Patch-For-Review
Feb 24 2023, 5:10 AM
2023-02-24 05:10:18 (UTC+0)
Func
mentioned this in
T318278: Self-referential Parser::getCachedRevisionObject() doesn't use last saved revision
Feb 24 2023, 5:25 AM
2023-02-24 05:25:29 (UTC+0)
Shizhao
closed this task as
Resolved
Mar 3 2023, 3:51 AM
2023-03-03 03:51:11 (UTC+0)
PatchDemoBot
added a comment.
Mar 3 2023, 3:54 AM
2023-03-03 03:54:16 (UTC+0)
Comment Actions
Test wiki on
Patch demo
by Shizhao using patch(es) linked to this task was
deleted
PatchDemoBot
added a comment.
Mar 6 2023, 12:43 PM
2023-03-06 12:43:06 (UTC+0)
Comment Actions
Test wiki on
Patch demo
by Shizhao using patch(es) linked to this task was
deleted
Log In to Comment
Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct.
Wikimedia Foundation
Code of Conduct
Disclaimer
CC-BY-SA
GPL
Credits
US