-
-
Notifications
You must be signed in to change notification settings - Fork 7k
AM/PM handling with 12-hour RTC setting? #3944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
maybe poll the time in 24 hour fmt intermediately? but IMO it's easier to always set to 24 hour fmt and then transform to PM if hour>12 in case that would be wishful for which reason ever.... or what is the problem? |
@damellis you are right, at the moment, we have no method to understand the time representation, however it ca be simply implemented pollig the control bit RTC_MODE2_CTRL_CLKREP in RTC->MODE2.CTRL.reg (that you set with the rtc.begin(bool timeRep). I also wnt to add methods that returns to you a string for time and date. What do you think about these improvements? |
I think you could start by just dropping 12 hour support, and letting the On Mon, Oct 19, 2015 at 12:38 AM, Arturo Guadalupi <[email protected]
|
@damellis @vogonjeltz I removed the 12 hour support as you suggested. It can be implemented in the sketch with no so may effort |
I'm closing this. Reopen it if there are further requests please |
We have this PR: |
Personally, I don't really see the value of 12 hour time. It just seems On Tue, Nov 17, 2015 at 8:28 AM, Arturo Guadalupi [email protected]
|
@damellis ok i asked also to Gabriel his opinion, and he agreed to remove it. So I'm closing this again! |
i think its better to setDS1307 in 24 hr mode and later convert it to 12 hr .Bcoz if we config it in 12 hr mode it is not possible to read whether it is am or pm.. im not pretty sure about this any way. |
If you put the RTC library in 12-hour mode, how does it handle AM and PM? Is there any way to specify whether or not an hour is AM or PM? Or tell, when you get the time, whether it's AM or PM? If not, should we just eliminate 12-hour mode?
The text was updated successfully, but these errors were encountered: