Skip to content
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

Allow selecting time format #3

Open
Testato opened this issue Dec 12, 2015 · 4 comments · May be fixed by #94 or #207
Open

Allow selecting time format #3

Testato opened this issue Dec 12, 2015 · 4 comments · May be fixed by #94 or #207
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@Testato
Copy link
Contributor

Testato commented Dec 12, 2015

Today i needed formatted result only on HHmm, so i modified the get formatted metodhs.
So if you agree it is a good idea create a new constructor whit a new argument passed for select some formatted result:

  • HHmm
  • HHmmss
  • Etc.
@Testato Testato changed the title Idea for new functions Formatting results Apr 13, 2016
@FWeinb
Copy link
Collaborator

FWeinb commented May 25, 2016

I don't think adding time formatting to this library is a good idea. In my opinion any further time formatting should be done externally. The getFormattedTime() function is just to get you started.

@sandeepmistry
Copy link
Contributor

I agree with @FWeinb on this.

If it doesn't exist already, a separate date formatting/parsing Arduino library would be ideal.

@Bif1005

This comment was marked as off-topic.

@blackketter
Copy link

For general clock functions, I use the excellent https://github.com/PaulStoffregen/Time library and use NTP as a time sync provider.

#include "TimeLib.h"
time_t ntpSyncProvider() {
  return timeClient.getEpochTime();
}

then:

  setSyncProvider(&ntpSyncProvider);

That library does include an NTP example but I prefer using this NTPClient.

@per1234 per1234 added topic: code Related to content of the project itself type: enhancement Proposed improvement labels Jan 15, 2022
@per1234 per1234 changed the title Formatting results Allow selecting time format May 15, 2023
@per1234 per1234 linked a pull request Jun 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
6 participants