-
Notifications
You must be signed in to change notification settings - Fork 215
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
Business days calculation broken in 0.7.5 #132
Comments
Likewise 0.7.4
0.7.5
|
From lib/business_time/business_time.rb
Looks to me to be done on purpose. It seems to be one of the biggest changes is around handling of business days now being defaulted to 9am to 5pm, instead of 12am to 11:59pm. Make sure you generate your yaml config file (using generator in the README), and change the settings there if you were relying on anything like that. |
That's a pretty big change to introduce in a point version :( |
Agreed. I think this should have followed semantic versioning. Lack of a changelog is problematic as well. |
Ditto. If it's 2:25 pm on Wednesday, I would expect 1.business_day.ago to be 2:25 pm on Tuesday, not the beginning of the business day on Tuesday, whatever that's set to be. |
this was an accident. I'm looking into it now. Accepting multiple pull requests, dealing with monkeypatches on top of ActiveSupport Monkeypatches becomes a lot to deal with. Future versions will have a change log. |
I am not seeing the issue you describe above. Here I am with your test cases: Time.now
2016-06-09 10:37:42 -0400
2.business_days.ago
2016-06-07 10:37:58 -0400
2.business_days.ago.in_time_zone("America/Los_Angeles")
Tue, 07 Jun 2016 07:38:22 PDT -07:00
Time.now.in_time_zone("America/Los_Angeles")
Thu, 09 Jun 2016 07:38:51 PDT -07:00
2.business_days.from_now.in_time_zone("America/Los_Angeles")
Mon, 13 Jun 2016 07:39:03 PDT -07:00 Can you tell me:
Or even better, a failing test case added to the tests? |
This issue may have an interaction with the stub method of rspec 2.x and this way of writing time-deterministic tests :
Under 0.7.4, stubbing with utc and new give identical responses:
|
0.7.4
0.7.5
The text was updated successfully, but these errors were encountered: