Added evaluable representation for the FixedOffsetTimezone object.

This commit is contained in:
Daniele Varrazzo 2010-05-05 00:01:24 +01:00
parent d30daac782
commit 60e7522e47

View File

@ -49,6 +49,10 @@ class FixedOffsetTimezone(datetime.tzinfo):
if name is not None: if name is not None:
self._name = name self._name = name
def __repr__(self):
return "psycopg2.tz.FixedOffsetTimezone(offset=%r, name=%r)" \
% (self._offset.seconds // 60, self._name)
def utcoffset(self, dt): def utcoffset(self, dt):
return self._offset return self._offset