diff --git a/PriceSystem/RentCalcCmdSender.py b/PriceSystem/RentCalcCmdSender.py index cafb48a..797e226 100644 --- a/PriceSystem/RentCalcCmdSender.py +++ b/PriceSystem/RentCalcCmdSender.py @@ -11,15 +11,8 @@ import fangjia #import pytz def input_time(day): - #from dateutil.parser import parse - #today=parse(str(ti)) - today=datetime.datetime.now() - - #first = datetime.date(day=1, month=today.month, year=today.year) - lastMonth = today - datetime.timedelta(days=day) - def plus(k): if k<10: return '0'+str(k) @@ -27,13 +20,9 @@ def input_time(day): return str(k) y=lastMonth.year m=lastMonth.month - #d=lastMonth.day day=calendar.monthrange(y,m)[1] cc=str(y)+plus(m)+plus(day) - #bb=parse(cc) - #pacific = pytz.timezone('Asia/Shanghai') - #return pacific.localize(bb) return int(cc) @@ -53,8 +42,8 @@ logger = fangjia.get_logger("RentCalcCmdSender") def get_district(city): - timm=input_time(0) - timd=input_time(360) + timm=input_time(30) + timd=input_time(390) seaweeds = [] keys = {"city": 1, "region": 1, "name": 1, "_id": 0} for dis in fangjia.get_collection("fangjia", "seaweed", config.get_seaweed_host()).find({"cat": "district", "status": 0, "city": city}, keys):