Date: Tue, 2 Jun 2015 20:53:18 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283929 - head/games/grdc Message-ID: <201506022053.t52KrIuk046680@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Tue Jun 2 20:53:17 2015 New Revision: 283929 URL: https://svnweb.freebsd.org/changeset/base/283929 Log: Correct grdc(1) 12-hour display between 12:00 and 13:00 PM starts at 12:00, not 13:00. PR: 194291, 200133 Submitted by: Nick Price MFC after: 1 week Modified: head/games/grdc/grdc.c Modified: head/games/grdc/grdc.c ============================================================================== --- head/games/grdc/grdc.c Tue Jun 2 20:29:58 2015 (r283928) +++ head/games/grdc/grdc.c Tue Jun 2 20:53:17 2015 (r283929) @@ -150,14 +150,14 @@ main(int argc, char *argv[]) set(tm->tm_min/10, 14); if (t12) { - if (tm->tm_hour > 12) { - tm->tm_hour -= 12; - mvaddstr(YBASE + 5, XBASE + 52, "PM"); - } else { + if (tm->tm_hour < 12) { if (tm->tm_hour == 0) tm->tm_hour = 12; - mvaddstr(YBASE + 5, XBASE + 52, "AM"); + } else { + if (tm->tm_hour > 12) + tm->tm_hour -= 12; + mvaddstr(YBASE + 5, XBASE + 52, "PM"); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506022053.t52KrIuk046680>