Return an aware or naive datetime.datetime, depending on settings.USE_TZ.

def now(tzinfo=True):
    """
    Return an aware or naive datetime.datetime, depending on settings.USE_TZ.
    """
    if dj_now:
        return dj_now()

    if tzinfo:
        # timeit shows that datetime.now(tz=utc) is 24% slower
        return datetime.utcnow().replace(tzinfo=utc)
    return datetime.now()