KoboUSBMS
KoboUSBMS copied to clipboard
FR: 12 Hour Clock?
Could the clock on the USBMS screen display 12 hour time when ["twelve_hour_clock"] = true is set in koreader settings?
USBMS has an example of how to read settings:
https://github.com/koreader/KoboUSBMS/blob/726f5efe8036e2dda2111114fc0e9c21202a0959/usbms.c#L479-L495
And the clock formatting code, currently:
https://github.com/koreader/KoboUSBMS/blob/726f5efe8036e2dda2111114fc0e9c21202a0959/usbms.c#L716
...could conditionally display 12/24 hour clock something like:
if (twelve_hour_clock) {
strftime(sz_time, sizeof(sz_time), "%I:%M %p", lt);
} else {
strftime(sz_time, sizeof(sz_time), "%H:%M", lt);
}
I'd offer a PR, but I don't have a build environ to test in, and how to implement reading the setting could go a couple different ways.