polars.Series.dt.base_utc_offset#
- Series.dt.base_utc_offset() Series [source]#
Base offset from UTC.
This is usually constant for all datetimes in a given time zone, but may vary in the rare case that a country switches time zone, like Samoa (Apia) did at the end of 2011.
- Returns:
- Series
Series of data type
Duration
.
See also
Series.dt.dst_offset
Additional offset currently in effect.
Examples
>>> from datetime import datetime >>> ser = pl.date_range( ... datetime(2011, 12, 29), ... datetime(2012, 1, 1), ... "2d", ... time_zone="Pacific/Apia", ... eager=True, ... ) >>> ser shape: (2,) Series: 'date' [datetime[μs, Pacific/Apia]] [ 2011-12-29 00:00:00 -10 2011-12-31 00:00:00 +14 ] >>> ser.dt.base_utc_offset().rename("base_utc_offset") shape: (2,) Series: 'base_utc_offset' [duration[ms]] [ -11h 13h ]