-
Notifications
You must be signed in to change notification settings - Fork 7.8k
shell: date_service: make clear that leap seconds are not supported #94310
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
base: main
Are you sure you want to change the base?
shell: date_service: make clear that leap seconds are not supported #94310
Conversation
c9c1560
to
22cc4f0
Compare
Hi @diegoherranz, very valid point. To limit flash usage for a very narrow and erroneous use case it's likely better to limit range to 0-59 and remove additional string warning. |
tm_sec == 60 was accepted but it would only result in the time being wrongly set (off by 1 second) since SYS_CLOCK_REALTIME is following Unix time which doesn't support them. Better to not accept them in the first place. Signed-off-by: Diego Herranz <[email protected]>
22cc4f0
to
7515df9
Compare
Yes, I agree. Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
I believe the previous implementation was also fine. The |
SYS_CLOCK_REALTIME is following Unix time so, even if tm_sec == 60 is accepted, make very clear that leap seconds are not supported.