Page MenuHomePhabricator

{{REVISIONTIMESTAMP}} does not function as documented
Closed, ResolvedPublic

Description

Regarding r42075.

The comments in the code indicate that {{REVISIONTIMESTAMP}} is supposed to output the timestamp adjusted for the server-local timezone. However, the actual page output is adjusted for the timezone of the user who last triggered parsing of the page.

I'm not sure if the underlying bug is in getRevisionTimestamp() [includes/parser/Parser.php line 4646] or in userAdjust() [languages/Language.php line 466]. REVISIONTIMESTAMP expects that passing '' to userAdjust() for the $tz parameter will use the server-local timezone. However the "if (!$tz)" check in userAdjust() at line 469 overrides $tz with the user timezone if $tz is ''. I don't know whether passing '' to userAdjust() to get the server-local timezone is the intended behavior (in which case that check should be "if ($tz === false)") or whether getRevisionTimestamp() is wrong in thinking that works.


Version: 1.14.x
Severity: normal

Details

Reference
bz15980

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:18 PM
bzimport set Reference to bz15980.
bzimport added a subscriber: Unknown Object (MLST).

This was taken care of in r44915, by changing userAdjust().