Closed laugmanuel closed 5 months ago
mind having a look @ekohl ?
I wonder if expired_on
used to be a Date
and is now a Datetime
. db/migrate/20230112104438_change_expired_on_type.rb
at least changes the DB type, so that could be the cause. It was introduced in 5bf6333e553b8c938d5620516dd5d9f2cc33a23f which doesn't really describe the change.
In most places it's used there's some .to_date
code so perhaps that should also be done here? I don't really know the codebase so hard to say what's right here.
I wonder if
expired_on
used to be aDate
and is now aDatetime
.db/migrate/20230112104438_change_expired_on_type.rb
at least changes the DB type, so that could be the cause. It was introduced in 5bf6333 which doesn't really describe the change.
This might be the reason behind the different behaviour. I also don't know any reason behind this. Maybe @kamils-iRonin ?
In most places it's used there's some
.to_date
code so perhaps that should also be done here? I don't really know the codebase so hard to say what's right here.
I've also added .to_date
for the relevant line. However, being explicit with .days
sounds like a valid way to me.
I have a Python background. Explicit is good
Who can have a final look at this? As far as I understand, expire hosts is currently somewhat broken due to this bug.
I'm not sure if this bug existed all the time or if it is caused by Ruby changes.
See the following example: