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

Inconsistent output dates between calev-core and systemd cli #553

Closed
Sheryv opened this issue Mar 20, 2024 · 2 comments · Fixed by #580
Closed

Inconsistent output dates between calev-core and systemd cli #553

Sheryv opened this issue Mar 20, 2024 · 2 comments · Fixed by #580

Comments

@Sheryv
Copy link
Contributor

Sheryv commented Mar 20, 2024

Value of next elapse calculated by this library is different from the output of systemd-analyze calendar command for the same input values. Example:

  • systemd
$ systemd-analyze calendar --iterations=1 "*-2-* 10:00:00"
  Original form: *-2-* 10:00:00
Normalized form: *-02-* 10:00:00
    Next elapse: Sat 2025-02-01 10:00:00 CET
       (in UTC): Sat 2025-02-01 09:00:00 UTC
       From now: 10 months 13 days left

$ date
Wed 20 Mar 2024 10:01:36 AM CET
  • main method from calev-core
$ sbt core/run --ref "2024-03-20T10:01:00" "*-2-* 10:00:00"
Normalized:  *-02-* 10:00:00
Reference:   2024-03-20T10:01
Next Elapses:
- 2025-02-21T10:00

systemd returns 2025-02-01 and calev: 2025-02-21. Is this difference intentional or is it a bug?

@Sheryv Sheryv changed the title Inconsistent ouput dates between calev-core and systemd cli Inconsistent output dates between calev-core and systemd cli Mar 20, 2024
@eikek
Copy link
Owner

eikek commented Mar 20, 2024

This is a bug, 2025-02-21 doesn't make sense I believe. There are some tests defined in this file - if possible, would you mind adding a failing one? Of course, should you have time and energy to fix it, even better 😏

@Sheryv
Copy link
Contributor Author

Sheryv commented Mar 21, 2024

I took a quick look at the parser and I have no idea how to fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants