mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
ENH: Set date to "today" when neither month nor day is time match
This commit is contained in:
parent
9db44059fd
commit
49f9143535
1 changed files with 2 additions and 1 deletions
|
|
@ -208,7 +208,8 @@ class DateStrptime(DateTemplate):
|
|||
# If it is Jan 1st, it is either really Jan 1st or there
|
||||
# is neither month nor day in the log.
|
||||
# NOTE: Possibly makes week/year day incorrect
|
||||
date = date.replace(month=MyTime.gmtime()[1], day=1)
|
||||
date = date.replace(
|
||||
month=MyTime.gmtime()[1], day=MyTime.gmtime()[2])
|
||||
|
||||
if date.tzinfo:
|
||||
return ( calendar.timegm(date.utctimetuple()), dateMatch )
|
||||
|
|
|
|||
Loading…
Reference in a new issue