Changeset 4013
- Timestamp:
- 07/14/08 15:44:31 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tracticketstatsplugin/0.11/ticketstats-plugin/ticketstats/ticketstats.py
r3997 r4013 19 19 from trac.perm import IPermissionRequestor 20 20 21 from datetime import datetime, time, timedelta 21 from datetime import date, datetime, time, timedelta 22 from time import strptime 22 23 from trac.util.datefmt import to_timestamp, utc 23 24 … … 147 148 148 149 # default data 149 todays_date = date time.today()150 todays_date = date.today() 150 151 at_date = datetime.combine(todays_date,time(11,59,59,0,utc)) 151 152 from_date = at_date - timedelta( DEFAULT_DAYS_BACK ) 152 153 graph_res = DEFAULT_INTERVAL 154 155 at_date_str = at_date.strftime("%m/%d/%Y") 156 from_date_str= from_date.strftime("%m/%d/%Y") 157 158 # 2.5 only: at_date = datetime.strptime(at_date_str, "%m/%d/%Y") 159 at_date = datetime(*strptime(at_date_str, "%m/%d/%Y")[0:6]) 160 at_date = datetime.combine(at_date, time(11,59,59,0,utc)) # Add tzinfo 161 162 # 2.5 only: from_date = datetime.strptime(from_date_str, "%m/%d/%Y") 163 from_date = datetime(*strptime(from_date_str, "%m/%d/%Y")[0:6]) 164 from_date = datetime.combine(from_date, time(0,0,0,0,utc)) # Add tzinfo 153 165 154 166 count = []
