code: def _local_to_utc(self, timestamp, local_zone="America/Los_Angeles"):
          
  
          timestamp_new = pd.to_datetime(timestamp, infer_datetime_format=True, errors='coerce')
          timestamp_new = timestamp_new.tz_localize(local_zone).tz_convert(pytz.utc)
          timestamp_new = timestamp_new.strftime('%Y-%m-%d %H:%M:%S')
          return timestamp_new
docs: Convert local timestamp to UTC.
  
          Parameters
          ----------
          timestamp   : pd.DataFrame()
              Input Pandas dataframe whose index needs to be changed.
          local_zone  : str
              Name of local zone. Defaults to PST.
  
          Returns
          -------
          pd.DataFrame()
              Dataframe with UTC timestamps.