mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 09:12:44 +00:00
Handle 12-hour clocks properly: when the time is 00:00-00:59, adjust the
hour to 12 so the time reads "12:00-12:59 AM".
This commit is contained in:
parent
4d8cde2b41
commit
17527010e2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=116739
@ -149,8 +149,12 @@ int t12;
|
||||
if (tm->tm_hour > 12) {
|
||||
tm->tm_hour -= 12;
|
||||
mvaddstr(YBASE + 5, XBASE + 52, "PM");
|
||||
} else
|
||||
} else {
|
||||
if (tm->tm_hour == 0)
|
||||
tm->tm_hour = 12;
|
||||
|
||||
mvaddstr(YBASE + 5, XBASE + 52, "AM");
|
||||
}
|
||||
}
|
||||
|
||||
set(tm->tm_hour%10, 20);
|
||||
|
Loading…
Reference in New Issue
Block a user