diff --git a/ChangeLog b/ChangeLog index c748972e..87b0e658 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 ---------- diff --git a/server/datetemplate.py b/server/datetemplate.py index 806e2823..f7f19f0d 100644 --- a/server/datetemplate.py +++ b/server/datetemplate.py @@ -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