changeset 69:983c2792f8d8

Better deal with negative timezone offsets
author Chris Wanstrath <chris@ozmm.org>
date Thu, 30 Apr 2009 12:47:04 -0700
parents d28d3763eda3
children 5b91477fe215
files git_handler.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/git_handler.py
+++ b/git_handler.py
@@ -25,8 +25,10 @@
     if hours > 12:
         sign = '+'
         hours = 12 - (hours - 12)
+    elif hours > 0:
+        sign = '-'
     else:
-        sign = '-'
+        sign = ''
     return sign + str(hours).rjust(2, '0') + str(minutes).rjust(2, '0')
 
 def offset_to_seconds(offset):