The problem seems to be in the block log formatter. BlockLogFormatter::getMessageParameters() calls Language::translateBlockExpiry() to format the string "2 months" (and translate it). That in turn uses strtotime() to parse this value, and does not specify the $now parameter correctly, so January 1, 1970 is assumed. And two months, counting from January 1, 1970, is 59 days. Two months counting from today, when you made the block, is 61 days, and this correctly appears everywhere else (the block expires 2017-01-04T06:30:06Z).

BlockLogFormatter::getMessageParameters() and Language::translateBlockExpiry() should probably be fixed to use the date when the block was made for the $now parameter of strtotime().

--
Bartosz Dziewoński

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to