From: Nicolas Pitre Date: Wed, 18 May 2005 21:11:07 +0000 (-0400) Subject: [PATCH] fix show_date() for positive timezones X-Git-Tag: v0.99~547 X-Git-Url: https://git.octo.it/?p=git.git;a=commitdiff_plain;h=fbab835c03f1c73e4de920d00cd26519506d33fe [PATCH] fix show_date() for positive timezones Signed-off-by: Nicolas Pitre Signed-off-by: Linus Torvalds --- diff --git a/date.c b/date.c index 7371bc13..b0b83c9d 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;