I think the issue was by ths following , First, you really should consider reading Python's datetime docs. I don't think that you have a formatting problem. I think that you're misusing the method. See below. You don't actually need the datetime.strptime(s2, FMT) method, b/c it's job is to return a time object. See this answer. Yet the datetime.now() returns an object. See the docs.
it fixes the issue "Now" is a point in time. That means date matters; if it's noon now, yesterday noon is not also now. (Time of day also matters; 9 AM today is also not now.) Thus, it makes sense to have a datetime.datetime.now, but not a datetime.time.now. It could make sense to have a datetime.time.currentlocaltime or datetime.time.currentutctime, but those methods don't exist. You could put in a feature request if you want.
dateNow = datetime.datetime.now() causes AttributeError: type object 'datetime.datetime' has no attribute 'datetime'&quo
wish helps you datetime.datetime.now() refers to a method (now) of a class (2nd datetime) of a library (1st datetime), however you didn't import the entire library, just the single class (from datetime import datetime). Either import the entire library or call on the class without referring to the library.
python: convert pywintyptes.datetime to datetime.datetime
datetime.datetime.strptime("2016-04-01 17:29:25+00:00", '%Y-%m-%d %H:%M:%S %z')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/_strptime.py", line 324, in _strptime
ValueError: 'z' is a bad directive in format '%Y-%m-%d %H:%M:%S %z'