Skip to main content
`Ctrl`+`K`

# pandas.Series.dt.tz

Series.dt.tz

  Return the timezone.

  This property returns the timezone information associated with the datetime data. If the data is timezone-naive (i.e. has no timezone information), it returns None.

  Returns:
    zoneinfo.ZoneInfo,, datetime.tzinfo, pytz.tzinfo.BaseTZInfo, dateutil.tz.tz.tzfile, or None

      Returns None when the array is tz-naive.

  See also

  `DatetimeIndex.tz_localize`

    Localize tz-naive DatetimeIndex to a given time zone, or remove timezone from a tz-aware DatetimeIndex.

  `DatetimeIndex.tz_convert`

    Convert tz-aware DatetimeIndex from one time zone to another.

  Examples

  For Series:

      >>> s = pd.Series(["1/1/2020 10:00:00+00:00", "2/1/2020 11:00:00+00:00"])
      >>> s = pd.to_datetime(s)
      >>> s
      0   2020-01-01 10:00:00+00:00
      1   2020-02-01 11:00:00+00:00
      dtype: datetime64[us, UTC]
      >>> s.dt.tz
      datetime.timezone.utc

  For DatetimeIndex:

      >>> idx = pd.DatetimeIndex(
      ...     ["1/1/2020 10:00:00+00:00", "2/1/2020 11:00:00+00:00"]
      ... )
      >>> idx.tz
      datetime.timezone.utc