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

WorkingHours.in_working_hours?(Time.zone.now) not working on heroku ? #34

Closed
vkeziah opened this issue May 22, 2017 · 2 comments
Closed

Comments

@vkeziah
Copy link

vkeziah commented May 22, 2017

set time zone and updated code base accordingly on heroku , but the above method is not working as I expected , it always returns true only even my config values are out of the range
cropped

@Intrepidd
Copy link
Owner

Hey,

your Time.zone.now.in_working_hours? seems to be outside of the with_config block

@tom-lord
Copy link

If you want to set the working hours globally, i.e. not just within a block, as shown in the README you can use:

WorkingHours::Config.working_hours = { mon: {'09:00' => '12:00', '13:00' => '14:00'} }

Time.zone.now.in_working_hours? # This now uses the above config

@jarthod jarthod closed this as completed Jan 29, 2021
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

No branches or pull requests

4 participants