From 6c2167658353fa877b22ab5321098e4bd26347e6 Mon Sep 17 00:00:00 2001 From: "wangwenyan@fangjia.com" Date: Wed, 5 Dec 2018 14:31:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BD=97=E5=B9=B2=E5=B9=B3?= =?UTF-8?q?=E7=B1=B3=E7=A7=9F=E9=87=91=E7=AE=97=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PriceSystem/RentCalcCmdSender.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) 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):