FR: 12 Hour Clock?

Open
#5 0 comments 0 reactions 1 assignee View on GitHub

@NiLuJe is already working on this.

Since Jul 8, 2025.

Assessment

This issue has not been assessed yet.

Description

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.

Dominant language
C
Stars
25
Forks
7
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from koreader/KoboUSBMS

All issues in koreader/KoboUSBMS

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.