提交 fbab835c 编写于 作者: N Nicolas Pitre 提交者: Linus Torvalds

[PATCH] fix show_date() for positive timezones

Signed-off-by: NNicolas Pitre <nico@cam.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 850e82d8
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册