Delorean: AttributeError: 'datetime.date' object has no ...
blog.cesarcd.com › 2014Sep 12, 2014 · if dt.tzinfo is None: AttributeError: 'datetime.date' object has no attribute 'tzinfo' I was able to work around this by passing a datetime object instead of a single date: from datetime import date, datetime from delorean import Delorean dt = date(2013, 5, 06) dl = Delorean(datetime(dt.year, dt.month, dt.day), timezone="UTC")
AttributeError: 'datetime.date' object has no attribute ...
github.com › pallets › werkzeugFeb 20, 2015 · AttributeError: 'datetime.date' object has no attribute 'tzinfo' I have fixed adding the next code to werkzeug/contrib/atom.py file from datetime import datetime, time def format_iso8601(obj): """Format a datetime object for iso8601""" iso8601 = obj.isoformat() obj = datetime.combine(obj, time()) if obj.tzinfo: return iso8601 return iso8601 + 'Z'