兼容时间格式

pull/42/head
wenxianping 6 years ago
parent 4e2d9427f2
commit 975e808823

@ -440,14 +440,14 @@ class select:
:param token: :param token:
:return: :return:
""" """
new_train_date = str(time.asctime(time.strptime(self.station_dates[0], "%Y-%m-%d"))).split(" ") new_train_date = filter(None, str(time.asctime(time.strptime(self.station_dates[0], "%Y-%m-%d"))).split(" "))
getQueueCountUrl = self.confUrl["getQueueCountUrl"] getQueueCountUrl = self.confUrl["getQueueCountUrl"]
data = collections.OrderedDict() data = collections.OrderedDict()
data['train_date'] = "{0} {1} {2} {3} {4} GMT+0800 (CST)".format( data['train_date'] = "{0} {1} {2} {3} {4} GMT+0800 (CST)".format(
new_train_date[0], new_train_date[0],
new_train_date[1], new_train_date[1],
new_train_date[3], new_train_date[2],
new_train_date[5], new_train_date[4],
time.strftime("%H:%M:%S", time.localtime(time.time())) time.strftime("%H:%M:%S", time.localtime(time.time()))
), ),
data['train_no'] = self.get_ticketInfoForPassengerForm()['queryLeftTicketRequestDTO']['train_no'], data['train_no'] = self.get_ticketInfoForPassengerForm()['queryLeftTicketRequestDTO']['train_no'],

Loading…
Cancel
Save