datetime.timezone.utc

timezone.utc The UTC timezone, timezone(timedelta(0)).

datetime.timezone.tzname()

timezone.tzname(dt) Return the fixed value specified when the timezone instance is constructed or a string ‘UTCsHH:MM’, where s is the sign of offset, HH and MM are two digits of offset.hours and offset.minutes respectively.

datetime.timezone.fromutc()

timezone.fromutc(dt) Return dt + offset. The dt argument must be an aware datetime instance, with tzinfo set to self.

datetime.timezone.dst()

timezone.dst(dt) Always returns None.

datetime.timezone

class datetime.timezone(offset[, name]) The offset argument must be specified as a timedelta object representing the difference between the local time and UTC. It must be strictly between -timedelta(hours=24) and timedelta(hours=24) and represent a whole number of minutes, otherwise ValueError is raised. The name argument is optional. If specified it must be a string that is used as the value returned by the tzname(dt) method. Otherwise, tzname(dt) returns a string ‘UTCsHH:MM’, where s is th

datetime.timedelta.total_seconds()

timedelta.total_seconds() Return the total number of seconds contained in the duration. Equivalent to td / timedelta(seconds=1). Note that for very large time intervals (greater than 270 years on most platforms) this method will lose microsecond accuracy. New in version 3.2.

datetime.timedelta.resolution

timedelta.resolution The smallest possible difference between non-equal timedelta objects, timedelta(microseconds=1).

datetime.timedelta.min

timedelta.min The most negative timedelta object, timedelta(-999999999).

datetime.timedelta.max

timedelta.max The most positive timedelta object, timedelta(days=999999999, hours=23, minutes=59, seconds=59, microseconds=999999).

datetime.timedelta

class datetime.timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0) All arguments are optional and default to 0. Arguments may be integers or floats, and may be positive or negative. Only days, seconds and microseconds are stored internally. Arguments are converted to those units: A millisecond is converted to 1000 microseconds. A minute is converted to 60 seconds. An hour is converted to 3600 seconds. A week is converted to 7 days. and days, seconds an