123456789101112 |
- from datetime import timedelta, datetime
- import model
- 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))
- model.cleanup()
- except OverflowError:
- print('The expiration time is too far in the future.')
|