git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] fix show_date() for positive timezones

From
Nicolas Pitre <nico@cam.org>
Date
May 18, 2005, 21:11 UTC
Message-ID
<Pine.LNX.4.62.0505181709150.20274@localhost.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;
Message 1 of 1 in “fix show_date() for positive timezones”
  1. fix show_date() for positive timezonesNicolas Pitre, May 18, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.