-
Notifications
You must be signed in to change notification settings - Fork 185
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
Fix parsing begin time flag #268
Fix parsing begin time flag #268
Conversation
- Parsing of start time failed, because regex produces 3 matching groups, not more - Replace UTC with local timezone when computing delay. This matches the expectation of the user
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.
- Can we split this into 2 changes? Based on the comment on the issue, the discussion around "how to fix date parsing which is broken" is distinct from the discussion around "how to support timezones".
- Can we include a test for this? We already have TestWaitForCron() which was the most important part to get right, given its complexities), so this should be easy enough to add. More importantly, it will help explain the use cases here.
I've added the tests to cover basic cases, not looking at timezones yet. {"fail invalid time", "2401", "2018-10-10T10:00:00Z", time.Duration(0), fmt.Errorf("invalid format for begin delay '2401'")},
{"fail too long time", "12345", "2018-10-10T10:00:00Z", time.Duration(0), fmt.Errorf("invalid format for begin delay '12345'")},
|
Thanks. Keeps it cleaner.
So I should wait to kick off CI? |
- change begin time regex to only allow 4 characters - add test for regex - add tests for time outside normal range
Ready to merge |
All looks good, but needs a rebase. |
…parsing-begin-flag # Conflicts: # pkg/core/timer.go
Closes #267