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

Add timezone customization #115

Closed
wants to merge 1 commit into from
Closed

Add timezone customization #115

wants to merge 1 commit into from

Conversation

escudeiro
Copy link

Add support to use a different timezone without setting system default timezone.

  • Test added
  • Backwards compatibility maintained

@laurencei
Copy link
Contributor

I'm using this - and its working great.

But I noticed there was no support for adding timezones to the getNextRunDate() etc - so I've made those changes in my fork here if interested: https://github.com/lioannou/cron-expression

@dragonmantank
Copy link
Collaborator

@lioannou Would you mind doing a proper PR for that?

@laurencei laurencei mentioned this pull request Jan 23, 2017
@escudeiro escudeiro closed this Aug 11, 2017
LoneRegister pushed a commit to LoneRegister/cron-expression that referenced this pull request Sep 5, 2023
* DST fix (attempt 1)

* More tests and further fixes
WIP as I believe the change to HoursField::isSatisfiedBy is going to break expressions with multiple parts - but one thing at a time!

* WIP More tests and further fixes;
API change: isSatisfiedBy now requires knowledge of which direction we're travelling in to handle checking initial values correctly

* WIP Save Point - Trying to fix one thing breaks another, but I have an idea...

* WIP Abstracted NextRunDateTime which keeps track of offset changes, regardless of whether they occurred when changing minute or hour (and to persist them until a next change is made)

* WIP Fix easy fixes

* WIP More test fixes

* All current tests pass!

* Fix for issue mtdowling#112;
Use a cache of timezone transitions to avoid having to modify date/time objects every single time we want to check if hour is satisfied
All tests pass

* Cleanup
All tests pass

* Cleanup
All tests pass

* Cleanup - backing out the NextRunDateTime abstraction;
All tests pass

* Cleanup;
All tests pass

* Cleanup (diff tidy, restoring deleted tests);
All tests pass

* Cleanup (diff tidy);
All tests pass

* Fix CI issues

* Fix CI issues

Co-authored-by: Chris Tankersley <chris@ctankersley.com>
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 this pull request may close these issues.

None yet

3 participants