Page MenuHomePhabricator

TimestampException: ConvertibleTimestamp::setTimestamp: Invalid timestamp (timestamp with decimal point represented with a comma)
Open, Needs TriagePublic


Today a user reported an error on IRC when saving an article, on MediaWiki 1.34

hello, I've upgraded from mediawiki 1.32 to 1.34 and unfortunately I'm facing a timestamp exception and I couldn't find a solution for it yet. does anyone of you have a tip that could help solving this problem
the error occurs whenever I save an article, but when I load that article again and ignore the exception the changes are saved to the article

This is the error:

[19d2abb5b713c6e601d3e723] /wiki/index.php/Spielwiese Wikimedia\Timestamp\TimestampException from line 240 of /var/lib/mediawiki-1.34/vendor/wikimedia/timestamp/src/ConvertibleTimestamp.php: Wikimedia\Timestamp\ConvertibleTimestamp::setTimestamp: Invalid timestamp - 1577617438,7303

The timestamp 1577617438,7303 contains a comma, which is in fact the decimal separator used by some locales (German in this case).

I suggested the user to set this line in LocalSettings.php for the same reason as T181987:

$wgShellLocale = "C.UTF-8";

And it solved the problem.

This seems to be a new instance of T181987, however this didn't happen in previous versions, since unlike T181987, I haven't heard of this issue for timestamps before.