Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tools.urbanecmbot@tools-bastion-02 ~/afdHelper
- $ cat test.py
- #!/usr/bin/env python
- #-*- coding: utf-8 -*-
- import datetime
- test = datetime.datetime.strptime('9. 9. 2017, 11:12 (CEST)', '%d. %m. %Y, %H:%M (%Z)')
- tools.urbanecmbot@tools-bastion-02 ~/afdHelper
- $ python test.py
- tools.urbanecmbot@tools-bastion-02 ~/afdHelper
- $ jsub -N test python test.py
- Your job 3074381 ("test") has been submitted
- tools.urbanecmbot@tools-bastion-02 ~/afdHelper
- $ cat ~/test.*
- Traceback (most recent call last):
- File "test.py", line 5, in <module>
- test = datetime.datetime.strptime('9. 9. 2017, 11:12 (CEST)', '%d. %m. %Y, %H:%M (%Z)')
- File "/usr/lib/python2.7/_strptime.py", line 325, in _strptime
- (data_string, format))
- ValueError: time data '9. 9. 2017, 11:12 (CEST)' does not match format '%d. %m. %Y, %H:%M (%Z)'
- tools.urbanecmbot@tools-bastion-02 ~/afdHelper
- $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement