Re: [Wikitech-l] Erroneous duration of block
Tgr noticed that this is apparently filed as https://phabricator.wikimedia.org/T55907. ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] Erroneous duration of block
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 Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] Erroneous duration of block
On Fri, 2016-11-04 at 07:45 +0100, Bináris wrote: > Is there already a bug ticket in this case? If you cannot spot anything after clicking "Open Tasks" on https://phabricator.wikimedia.org/tag/mediawiki-user-blocking/ feel free to file a task [1]. :) Thanks!, andre [1] https://mediawiki.org/wiki/How_to_report_a_bug -- Andre Klapper | Wikimedia Bugwrangler http://blogs.gnome.org/aklapper/ ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
[Wikitech-l] Erroneous duration of block
HI, I gave 2 months to a guy using the string "2 months"[1] according to [2]. In the block log and recent changes "59 days" is shown instead of "61 days". However, int he list of blocked users and IPs there is already a correct expiry and now it shows that "60 nap, 23 óra és 47 perc" is left. Is there already a bug ticket in this case? As far as I remember, this is not the first time we talk about this. [1] https://hu.wikipedia.org/w/index.php?title=Speci%C3%A1lis:Rendszernapl%C3%B3k&dir=prev&offset=201611040540009&type=block [2] http://www.gnu.org/software/tar/manual/html_node/Relative-items-in-date-strings.html#SEC129 -- Bináris ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l