python remove timezone from datetime code example Example: python datetime remove timezone # dt_tz is a datetime.datetime object dt = dt_tz.replace(tzinfo=None)