Skip to content

Commit

Permalink
Issue with datetime total_seconds object and python2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Muddytm committed Mar 17, 2016
1 parent 396e18b commit 75305a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion skytap/framework/Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,7 @@ def dst(self, dt=None):

def __repr__(self):
"""String representation of the offset."""
return 'FixedOffset(%d)' % (self.utcoffset().total_seconds() / 60)
total_seconds = (self.utcoffset().microseconds + 0.0 +
(self.utcoffset().seconds + self.utcoffset().days *
24 * 3600) * 10 ** 6) / 10 ** 6
return 'FixedOffset(%d)' % (total_seconds / 60)

0 comments on commit 75305a5

Please sign in to comment.