tz_util – Utilities for dealing with timezones in Python

Timezone related utilities for BSON.

class bson.tz_util.FixedOffset(offset, name)

Fixed offset timezone, in minutes east from UTC.

Implementation based from the Python standard library documentation. Defining __getinitargs__ enables pickling / copying.


datetime -> DST offset in minutes east of UTC.


datetime -> string name of time zone.


datetime -> minutes east of UTC (negative for west of UTC).

bson.tz_util.utc = <bson.tz_util.FixedOffset object>

Fixed offset timezone representing UTC.