def aware_to_naive(d):
 offset = d.utcoffset()
 if offset:
  d = d.replace(tzinfo=None)
  d = (d - offset)
 return d

def aware_to_naive ( d ) : offset = d . utcoffset ( ) if offset : d = d . replace ( tzinfo = None ) d = ( d - offset ) return d
convert an aware date to an naive date .