Jingdong seckill product rush purchase - Moutai rush purchase automatically obtains the rush purchase time

1. Open time.py and add above class Timer:

 

2. Comment out #self.buy_time = datetime.strptime(global_config.getRaw('config', 'buy_time'), "%Y-%m-%d %H:%M:%S.%f")
below Add:
self.buy_time =get_sku_time()
to save, then remember to run the test:

 



Explanation: x_time = x_time+d.timedelta(seconds=-0.5) The 0.5 behind it can be viewed and modified by yourself, which means to subtract 0.5 seconds. If
someone corrects the mistake in advance, please post the screenshot of the modification:

 

Guess you like

Origin blog.csdn.net/2302_76405773/article/details/132069059