Advertisement
Urbanecm

Untitled

Dec 16th, 2017
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. tools.urbanecmbot@tools-bastion-02 ~/afdHelper
  2. $ cat test.py
  3. #!/usr/bin/env python
  4. #-*- coding: utf-8 -*-
  5.  
  6. import datetime
  7. test = datetime.datetime.strptime('9. 9. 2017, 11:12 (CEST)', '%d. %m. %Y, %H:%M (%Z)')
  8. tools.urbanecmbot@tools-bastion-02 ~/afdHelper
  9. $ python test.py
  10. tools.urbanecmbot@tools-bastion-02 ~/afdHelper
  11. $ jsub -N test python test.py
  12. Your job 3074381 ("test") has been submitted
  13. tools.urbanecmbot@tools-bastion-02 ~/afdHelper
  14. $ cat ~/test.*
  15. Traceback (most recent call last):
  16. File "test.py", line 5, in <module>
  17. test = datetime.datetime.strptime('9. 9. 2017, 11:12 (CEST)', '%d. %m. %Y, %H:%M (%Z)')
  18. File "/usr/lib/python2.7/_strptime.py", line 325, in _strptime
  19. (data_string, format))
  20. ValueError: time data '9. 9. 2017, 11:12 (CEST)' does not match format '%d. %m. %Y, %H:%M (%Z)'
  21. tools.urbanecmbot@tools-bastion-02 ~/afdHelper
  22. $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement