12345678910111213 |
- from datetime import timedelta, datetime
- import model
- from model import cleanup
- if __name__ == '__main__':
- timeout = float(input('How long will the initial selling be available? (minutes):'))
- try:
- expiry = datetime.strptime(model.current_db_time(), '%Y-%m-%d %H:%M:%S') + timedelta(minutes=timeout)
- print(model.new_stock(expiry))
- cleanup()
- except OverflowError:
- print('The expiration time is too far in the future.')
|