# Path: khayyam/helpers.py
# def force_encoded_string_output(func):  # pragma: no cover
#     if sys.version_info.major < 3:
#         def _func(*args, **kwargs):
#             return func(*args, **kwargs).encode('utf-8')
#         return _func
#     else:
#         return func


from datetime import tzinfo, timedelta
from khayyam.helpers import force_encoded_string_output
        if delta:
            dt += delta  # convert to standard local time
            dst_offset = dt.dst()

        if dst_offset:
            return dt + dst_offset
        else:
            return dt

    def utcoffset(self, dt):
        if self._is_dst(dt):
            return self._offset + self._dst_offset
        else:
            return self._offset

    def dst(self, dt):
        if self._dst_offset and self._is_dst(dt):
            return self._dst_offset
        else:
            return ZERO_DELTA

    def __unicode__(self):
        off = self._offset
        return '%s%.2d:%.2d%s' % (
            '+' if off.total_seconds() >= 0 else '-',
            int(off.total_seconds() / 3600),
            int((off.total_seconds() % 3600) / 60),
            (' dst:%d' % (self._dst_offset.total_seconds() / 60)) if self._dst_offset else ''
        )


# Path: khayyam/helpers.py
# def force_encoded_string_output(func):  # pragma: no cover
#     if sys.version_info.major < 3:
#         def _func(*args, **kwargs):
#             return func(*args, **kwargs).encode('utf-8')
#         return _func
#     else:
#         return func


# Path: khayyam/timezones.py
from datetime import tzinfo, timedelta
from khayyam.helpers import force_encoded_string_output

        if delta:
            dt += delta  # convert to standard local time
            dst_offset = dt.dst()

        if dst_offset:
            return dt + dst_offset
        else:
            return dt

    def utcoffset(self, dt):
        if self._is_dst(dt):
            return self._offset + self._dst_offset
        else:
            return self._offset

    def dst(self, dt):
        if self._dst_offset and self._is_dst(dt):
            return self._dst_offset
        else:
            return ZERO_DELTA

    def __unicode__(self):
        off = self._offset
        return '%s%.2d:%.2d%s' % (
            '+' if off.total_seconds() >= 0 else '-',
            int(off.total_seconds() / 3600),
            int((off.total_seconds() % 3600) / 60),
            (' dst:%d' % (self._dst_offset.total_seconds() / 60)) if self._dst_offset else ''
        )


    __repr__ = force_encoded_string_output(__unicode__)