Issue 17342: datetime.strptime does not implement %z (original) (raw)
Python 2.x is in maintenance mode and will not receive new features. In 3.x this is already implemented:
Python 3.3.2 (default, May 24 2013, 22:46:58) [GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin Type "help", "copyright", "credits" or "license" for more information.
from datetime import * print(datetime.strptime('20010101 010101 -0400', '%Y%m%d %H%M%S %z')) 2001-01-01 01:01:01-04:00