Date.current also returns
Date.today if timeZone is not set other wise returns
Today's Date of current time zone. We can verify this by changing the timezone.
If your doing comparisons you should always use
This is because if you’re in a timezone that could be in a different day than UTC, and your timezone isn’t set then you can have the situation where
Date.today == Date.tomorrow
So it would be more preferable
<% if advert.deadline < Date.current %>