from datetime import datetime
import pytz


def datetime_to_utc(timestamp: str,
                    timezone: str,
                    timestamp_format: str = '%Y-%m-%d %H:%M:%S') -> str:
  """Convert timezone specific timestamp to UTC time."""
  local = datetime.strptime(timestamp, timestamp_format)
  return str(pytz.timezone(timezone).localize(local).astimezone(pytz.utc))[:-6]