|
@@ -464,21 +464,23 @@ class AdminManage(TemplateView):
|
|
def query_push_day_statistics(self, level, response):
|
|
def query_push_day_statistics(self, level, response):
|
|
start_time = 0
|
|
start_time = 0
|
|
end_time = 0
|
|
end_time = 0
|
|
- localtime = time.localtime()
|
|
|
|
- current_day = localtime.tm_mday
|
|
|
|
-
|
|
|
|
- time_struct = [localtime.tm_year, localtime.tm_mon, current_day, 0, 0, 0, 0, 0, 0]
|
|
|
|
- current_time = int(time.mktime(tuple(time_struct)))
|
|
|
|
- current_time = current_time - time.timezone - 8 * 60 * 60
|
|
|
|
|
|
+ # localtime = time.localtime()
|
|
|
|
+ # current_day = localtime.tm_mday
|
|
|
|
+ #
|
|
|
|
+ # time_struct = [localtime.tm_year, localtime.tm_mon, current_day, 0, 0, 0, 0, 0, 0]
|
|
|
|
+ # current_time = int(time.mktime(tuple(time_struct)))
|
|
|
|
+ current_time = int(time.time())
|
|
|
|
+ count = int(current_time / (24 * 3600))
|
|
|
|
+ current_time = count * 24 * 3600 - 8 * 3600
|
|
count = 0
|
|
count = 0
|
|
if level == 0: # 七天
|
|
if level == 0: # 七天
|
|
- start_time = current_time - 6 * 24 * 60 * 60
|
|
|
|
|
|
+ start_time = current_time - 6 * 24 * 3600
|
|
count = 6
|
|
count = 6
|
|
elif level == 1:
|
|
elif level == 1:
|
|
- start_time = current_time - 13 * 24 * 60 * 60
|
|
|
|
|
|
+ start_time = current_time - 13 * 24 * 3600
|
|
count = 13
|
|
count = 13
|
|
elif level == 2:
|
|
elif level == 2:
|
|
- start_time = current_time - 29 * 24 * 60 * 60
|
|
|
|
|
|
+ start_time = current_time - 29 * 24 * 3600
|
|
count = 29
|
|
count = 29
|
|
|
|
|
|
end_time = current_time
|
|
end_time = current_time
|
|
@@ -607,7 +609,6 @@ class AdminManage(TemplateView):
|
|
return response.json(444)
|
|
return response.json(444)
|
|
|
|
|
|
date = datetime.datetime(2020, 9, 15)
|
|
date = datetime.datetime(2020, 9, 15)
|
|
- tmp_time = 3600 * float(tz)
|
|
|
|
start_time = date.fromtimestamp((int(start_time)))
|
|
start_time = date.fromtimestamp((int(start_time)))
|
|
end_time = date.fromtimestamp(int(end_time))
|
|
end_time = date.fromtimestamp(int(end_time))
|
|
tz = int(tz)
|
|
tz = int(tz)
|