summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2005-05-18 21:11:07 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-18 21:23:04 (GMT)
commitfbab835c03f1c73e4de920d00cd26519506d33fe (patch)
treeea3352de6c58ce31cc99d4996b090d6dae0b20c8
parent850e82d889f374465dc7aa6cb4af3098c7e02f1f (diff)
downloadgit-fbab835c03f1c73e4de920d00cd26519506d33fe.zip
git-fbab835c03f1c73e4de920d00cd26519506d33fe.tar.gz
git-fbab835c03f1c73e4de920d00cd26519506d33fe.tar.bz2
[PATCH] fix show_date() for positive timezones
Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--date.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/date.c b/date.c
index 7371bc1..b0b83c9 100644
--- a/date.c
+++ b/date.c
@@ -51,9 +51,9 @@ const char *show_date(unsigned long time, int tz)
int minutes;
minutes = tz < 0 ? -tz : tz;
- minutes = (tz / 100)*60 + (tz % 100);
+ minutes = (minutes / 100)*60 + (minutes % 100);
minutes = tz < 0 ? -minutes : minutes;
- t = time - minutes * 60;
+ t = time + minutes * 60;
tm = gmtime(&t);
if (!tm)
return NULL;