pandas.Timestamp.utcoffset#
- Timestamp.utcoffset()#
Return utc offset.
This method returns the difference between UTC and the local time as a timedelta object. It is useful for understanding the time difference between the current timezone and UTC.
- Returns:
- timedelta
The difference between UTC and the local time as a timedelta object.
See also
datetime.datetime.utcoffset
Standard library method to get the UTC offset of a datetime object.
Timestamp.tzname
Return the name of the timezone.
Timestamp.dst
Return the daylight saving time (DST) adjustment.
Examples
>>> ts = pd.Timestamp('2023-01-01 10:00:00', tz='Europe/Brussels') >>> ts Timestamp('2023-01-01 10:00:00+0100', tz='Europe/Brussels') >>> ts.utcoffset() datetime.timedelta(seconds=3600)