def _ToTimeZone(t, tzinfo):
  if pytz is None:

    return t.replace(tzinfo=tzinfo)
  elif tzinfo:

    if not t.tzinfo:
      t = pytz.utc.localize(t)
    return tzinfo.normalize(t.astimezone(tzinfo))
  elif t.tzinfo:

    return pytz.utc.normalize(t.astimezone(pytz.utc)).replace(tzinfo=None)
  else:

    return t
Converts 't' to the time zone 'tzinfo'.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/cron/groctimespecification.py/_ToTimeZone