# [PATCH] fix show_date() for positive timezones

1 messages from 2005-05-18 to 2005-05-18. Participants: Nicolas Pitre.
Thread: https://gitlist.dev/t/654

## Nicolas Pitre, 2005-05-18 21:11

Subject: [PATCH] fix show_date() for positive timezones
Message-ID: <Pine.LNX.4.62.0505181709150.20274@localhost.localdomain>
URL: https://gitlist.dev/e/Pine.LNX.4.62.0505181709150.20274%40localhost.localdomain

```

Signed-off-by: Nicolas Pitre <nico@cam.org>

--- a/date.c
+++ b/date.c
@@ -51,9 +51,9 @@ const char *show_date(unsigned long time
 	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;

```
