Author: overlordq
Description:
Patch to Skin.php
In r37158 Skin.php is changed so that lastModified will either return a date based on a specific revid or a given article. This is all fine an dandy, but the value this function returns is sent to Language::sprintfDate which unfortunately expects a certain input.
Before r37158 the only call was to $wgArticle->getTimestamp which pulled the timestamp and formatted it with TS_MW (YYYYMMDDHHMMSS). Unfortunately the added code polls and returns directly from the database. This is fine with MySQL as the timestamp is stored as a string in TS_MW format. With other DBs which store as a proper timestamp data types what it returns can vary. With PG's case:
Before: 20080703043819
After: 2008-07-03 04:38:19+00
Since sprintfDate expects TS_MW the substr inside the function will fail in odd ways when it tries to parse -0 as a month.
So the return from Revision::getTimestampFromId needs wrapped and formatted to the expected format.
Version: 1.13.x
Severity: enhancement
Attached: