Skip to content

Commit

Permalink
[PATCH] fix show_date() for positive timezones
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Nicolas Pitre authored and Linus Torvalds committed May 18, 2005
1 parent 850e82d commit fbab835
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions date.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fbab835

Please sign in to comment.