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

tzOffset is not uniform, only applies to first part of the cron toString expression, rest of the expression is still set at UTC timezone #289

Closed
1 task done
SergioJFalcon opened this issue Aug 9, 2023 · 1 comment

Comments

@SergioJFalcon
Copy link

SergioJFalcon commented Aug 9, 2023

Cron Expression
10 11 * * * with a tzOffset of -4 and verbose is set to true

Expected Output
"At 07:10 AM, every day At 07:00"

Actual Output
"At 07:10 AM, every day At 11:10"

Prerequisites

  • The cron expression being passed in is a valid expression. cRonstrue does not validate expressions and assumes the one you pass is already valid. See the FAQ for more details.
@bradymholt
Copy link
Owner

bradymholt commented Aug 10, 2023

@SergioJFalcon - The Expected and Actual Output in your example looks unexpected and possible modified before output by some code other than what cRonstrue is providing. Something like "At 07:10 AM, every day At 07:00" seems incorrect and not something cRonstrue would emit.

I tested your expression with tzOffset = -4 and it seems to be working correctly: https://runkit.com/bradymholt/64d4cf24b957c800080269df

Also, a test has been added here: #290

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

2 participants