<p dir="auto">If you block a user for two weeks, you'll see this:</p>
<p dir="auto"><a href="https://github.com/openstreetmap/openstreetmap-website/assets/4158490/3a756071-782c-44f3-8060-875b7ce56574">image.png (view on web)</a></p>
<blockquote>
<p dir="auto">Duration: 1 week</p>
</blockquote>
<p dir="auto">The block end date is computed before <code class="notranslate">created_at</code> and its duration ends up being slightly shorter. Everything is rounded down and you get an incorrect value.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/4439'>https://github.com/openstreetmap/openstreetmap-website/pull/4439</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4439/commits/8c32e6349281dc041af55d3b493fdeac85212b02" class="commit-link">8c32e63</a> Set block ends_at to exactly created_at + duration</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4439/files">2 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4439/files#diff-5fb62154bcc2028d8f094225ee59e06e6dc57b853e0d429f7ebab0168f428111">app/controllers/user_blocks_controller.rb</a>
(4)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4439/files#diff-9ca0f3412d30fa75d21d710e7d0f07b08a8eeb934543b9db405b8d63619548c1">test/controllers/user_blocks_controller_test.rb</a>
(15)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4439.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/4439.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4439.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/4439.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4439">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLMTFKI3UYK7MTEKV23YLOL5HAVCNFSM6AAAAABBD4KDXKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA2TMOBYGE4DCNI">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLNRVHPQV4KTQT6VLTLYLOL5HA5CNFSM6AAAAABBD4KDXKWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHHVGMGS4.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/4439</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/4439",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4439",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>