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

Class 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
 
__cmp__(self, other) source code

Inherited from datetime.tzinfo: __getattribute__, __new__, __reduce__, fromutc

Inherited from object: __delattr__, __format__, __hash__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

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

Inherited from object: __class__

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