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 the sign of offset, HH and MM are two digits of offset.hours and offset.minutes respectively.

New in version 3.2.

doc_python
2016-10-07 17:31:03
Comments
Leave a Comment

Please login to continue.