Phambili-Tech / Newt_Display

An Arduino library for the Phambili Newt - a low power smart display
Other
58 stars 7 forks source link

Feature request: expose 12/24 hour setting #1

Closed andypiper closed 2 years ago

andypiper commented 2 years ago

I just took delivery of my Newt (thank you! exciting to have it in my hands, it is lovely).

I'd like to have it display the time in 24 hour format. I can see in the code that it seems to default to 24 hour but then immediately call a function to set it to 12 hour time. I've not yet dug into this, but is the only way to change the behaviour to change the code, or is there somewhere that I can toggle it via buttons?

Happy to work on this as an enhancement once I have some more time (if needed)

darianbjohnson commented 2 years ago

Andy - another great comment... right now the 12 hour time is the default - however, I think it's relatively easy to make that a user option (to me controlled in the settings screen).

Would you also want to set the alarm using 24 hour format?

andypiper commented 2 years ago

Yes, I think it would be a global option everywhere time is present, so that would be my preference (and matches my experience of using 24 hour format on other devices).

rrubanov commented 2 years ago

Also metric system vs imperials, please. I like my Celsius.

darianbjohnson commented 2 years ago

So, my understanding is that 24 time (compared to 12 hour time format) would look like the following

In short - do I include a leading zero when the time is between midnight and noon? I also believe that a colon should be used (colons are excluded for military time).

rrubanov commented 2 years ago

TL;DR with zeros 00:15

https://en.wikipedia.org/wiki/ISO_8601#Times


[hh] refers to a zero-padded hour between 00 and 23.
[mm] refers to a zero-padded minute between 00 and 59.
[ss] refers to a zero-padded second between 00 and 60 (where 60 is only used to denote an added leap second).```
andypiper commented 2 years ago

I usually see it with a leading zero, and with colon separators.

darianbjohnson commented 2 years ago

Enhancement in 1.1.0-RC-1 available for testing

andypiper commented 2 years ago

Looks great, at 18:58 on a Tuesday evening. 👍🏻

darianbjohnson commented 2 years ago

Tested in beta and released