Package pyxb :: Package utils :: Module utility :: Class UTCOffsetTimeZone |
[hide private]
[frames] | no frames]

# type UTCOffsetTimeZone

source code

         object --+
                  |
    datetime.tzinfo --+
                      |
                     UTCOffsetTimeZone

A `datetime.tzinfo` subclass that helps deal with UTC conversions in an ISO8601 world.

This class only supports fixed offsets from UTC.

Instance Methods | [hide private]
__init__(self, spec=None) Create a time zone instance with a fixed offset from UTC. | source code
utcoffset(self, dt) Returns the constant offset for this zone. | source code
tzname(self, dt) Return the name of the timezone in the format expected by XML Schema. | source code
dst(self, dt) Returns a constant zero duration. | source code
__otherForComparison(self, other) | source code
__hash__(self) | source code
__eq__(self, other) | source code
__lt__(self, other) | source code
__ge__(x, y) x>=y | source code
__gt__(x, y) x>y | source code
__le__(x, y) x<=y | source code
__ne__(x, y) x!=y | source code
Inherited from `datetime.tzinfo`: `__getattribute__`, `__new__`, `__reduce__`, `fromutc`

Class Variables | [hide private]
| __Lexical_re = `re.compile(r'^`(``[`-\+`]``)``(`\d\d`)`:`(`\d\d`)`$')`
| __utcOffset_min = `0`
| __utcOffset_td = `None`
| __ZeroDuration = `datetime.timedelta(0)`
| __MaxOffset_td = `datetime.timedelta(0, 50400)`

Method Details | [hide private]

### __init__(self, spec=None) (Constructor) | source code
Create a time zone instance with a fixed offset from UTC. Parameters: `spec` - Specifies the offset. Can be an integer counting minutes east of UTC, the value `None` (equal to 0 minutes east), or a string that conform to the ISO8601 time zone sequence (Z, or [+-]HH:MM). Overrides: object.__init__

### utcoffset(self, dt) | source code
Returns the constant offset for this zone. Overrides: datetime.tzinfo.utcoffset

### tzname(self, dt) | source code
Return the name of the timezone in the format expected by XML Schema. Overrides: datetime.tzinfo.tzname

### dst(self, dt) | source code
Returns a constant zero duration. Overrides: datetime.tzinfo.dst

### __hash__(self) (Hashing function) | source code
Overrides: object.__hash__ (inherited documentation)