ENH: Set date to "today" when neither month nor day is time match

pull/523/head
Steven Hiscocks 2013-12-18 21:06:03 +00:00
parent 9db44059fd
commit 49f9143535
1 changed files with 2 additions and 1 deletions

View File

@ -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 )