KoboUSBMS icon indicating copy to clipboard operation
KoboUSBMS copied to clipboard

FR: 12 Hour Clock?

Open JimmXinu opened this issue 7 months ago • 0 comments

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.

JimmXinu avatar Jun 12 '25 19:06 JimmXinu