code: def _localize(dt):
          
          try:
              tz = dt.tzinfo
              return tz.localize(dt.replace(tzinfo=None))
          except AttributeError:
              return dt
docs: Rely on pytz.localize to ensure new result honors DST.