- Use current day and month instead of Jan 1st if both are not available in the log. Thanks to Andreas Itzchak Rehberg.

git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@708 a942ae1a-1317-0410-a47c-b1dcaea8d605
_tent/ipv6_via_aInfo
Cyril Jaquier 2008-08-12 20:51:55 +00:00
parent 3615c8ec81
commit b26f9ca97a
2 changed files with 7 additions and 0 deletions

View File

@ -11,6 +11,8 @@ ver. 0.8.4 (2008/??/??) - stable
----------
- Merged patches from Debian package. Thanks to Yaroslav
Halchenko.
- Use current day and month instead of Jan 1st if both are
not available in the log. Thanks to Andreas Itzchak Rehberg
ver. 0.8.3 (2008/07/17) - stable
----------

View File

@ -146,6 +146,11 @@ class DateStrptime(DateTemplate):
# that the log is not from this year but from the year before
if time.mktime(date) > MyTime.time():
date[0] -= 1
elif date[1] == 1 and date[2] == 1:
# If it is Jan 1st, it is either really Jan 1st or there
# is neither month nor day in the log.
date[1] = MyTime.gmtime()[1]
date[2] = MyTime.gmtime()[2]
return date