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

Handling timezones in cron lines #2

Closed
hlascelles opened this Issue Mar 24, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@hlascelles

hlascelles commented Mar 24, 2018

Is the handling of timezones in fugit cron lines planned? (ie, will rufus-scheduler 4.x be compatible with rufus-scheduler 3.x?).

Background: que-scheduler uses fugit to parse cron lines. It was hoped the config file it would mirror the one for resque-scheduler. However fugit doesn't seem to handle timezones. This means the config for que-scheduler throws errors.

I could move to using rufus-scheduler 3.x in que-scheduler for now, but didn't want to add features which would not be forwardly compatible.

@jmettraux

This comment has been minimized.

Member

jmettraux commented Mar 25, 2018

Hello,

yes, the handling of timezones is planned. Yes, rufus-scheduler 3.x scheduling should be understood by rufus-scheduler 4.x.

I will work on that since you need it. Thanks for the feedback.

jmettraux added a commit that referenced this issue Mar 25, 2018

jmettraux added a commit that referenced this issue Mar 25, 2018

jmettraux added a commit that referenced this issue Mar 25, 2018

Travel in Cron zone in #next_time / #previous_time
Within #next_time and #previous_time, compute in the Cron instance zone.
Return a result in the initial from zone.

gh-2
@jmettraux

This comment has been minimized.

Member

jmettraux commented Mar 25, 2018

Hello @hlascelles

could you please tell me if the changes ending in ea7f47a are satisfying for you.

I make sure to store the zone given at the end of the cron line, #next_time and #previous_time calculate in that zone but make sure to return a EtOrbi::EoTime result instance in the "start" zone. For example if your cron is specified for Moscow but your Ruby process is set to Los Angeles, the transitions will be computed for Moscow but the result will be translated to Los Angeles time.

When we have something that works correctly, I will release a new version of fugit.

Thanks in advance.

@hlascelles

This comment has been minimized.

hlascelles commented Mar 26, 2018

Builds are passing: hlascelles/que-scheduler#8

Looks good. Thanks!

@jmettraux

This comment has been minimized.

Member

jmettraux commented Mar 26, 2018

fugit 1.1.0 just released. We have to give some time for the propagation in the Rubygems mirrors. Please tell me if there is anything wrong with this new version.

Closing.

Thanks again!

@jmettraux jmettraux closed this Mar 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment