Package psycopg2 :: Module tz :: Class FixedOffsetTimezone
[show private | hide private]
[frames | no frames]

Type FixedOffsetTimezone

object --+    
         |    
    tzinfo --+
             |
            FixedOffsetTimezone


Fixed offset in minutes east from UTC.

This is exactly the implementation found in Python 2.3.x documentation, with a small change to the __init__ method to allow for pickling and a default name in the form 'sHH:MM' ('s' is the sign.)


Method Summary
  __init__(self, offset, name)
  dst(self, dt)
  tzname(self, dt)
  utcoffset(self, dt)
    Inherited from tzinfo
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __new__(T, S, ...)
Return a new object with type S, a subtype of T...
  __reduce__(...)
-> (cls, state)
  fromutc(...)
datetime in UTC -> datetime in local time.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __hash__(x)
Return hash(x)...
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
Return repr(x)...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
Return str(x)...

Class Variable Summary
NoneType _name = None                                                                  
timedelta _offset = datetime.timedelta(0)

Method Details

__init__(self, offset=None, name=None)
(Constructor)

Overrides:
__builtin__.object.__init__

dst(self, dt)

Overrides:
datetime.tzinfo.dst

tzname(self, dt)

Overrides:
datetime.tzinfo.tzname

utcoffset(self, dt)

Overrides:
datetime.tzinfo.utcoffset

Class Variable Details

_name

Type:
NoneType
Value:
None                                                                  

_offset

Type:
timedelta
Value:
datetime.timedelta(0)