#39 ISO8601 dates not working correctly


I am using rsyslog and recently switched to its high-precision timestamp format, which based on ISO8601 (with timezone information, my timezone is +01:00). Fail2ban stopped banning anything after the switch.

Fail2ban seems to recognize the dates, but mis-calculates the timezone and thinks the logged lines are from an hour ago.

A quick and dirty fix is to change "utctimetuple" to "timetuple" at the end of datetemplate.py, but this might lead to problems during the DST => non-DST transition. The clean fix would probably be to make the getDate methods return a unix-timestamp, then there wouldn't be any need to mess around with local time.


  • Cyril Jaquier

    Cyril Jaquier - 2009-02-08
    • assigned_to: nobody --> lostcontrol
    • status: open --> closed-fixed
  • Cyril Jaquier

    Cyril Jaquier - 2009-02-08

    Changed utctimetuple to timetuple. Need more testing as this is maybe not a 100% correct fix. Fix will be in 0.8.4.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks