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

fix(node): Time zone handling for cron #11225

Merged
merged 1 commit into from Mar 21, 2024

Commits on Mar 21, 2024

  1. fix(node): Time zone handling for cron

    The `cron` package uses `timeZone`, while Sentry internally uses `timezone`. This caused Sentry cron jobs to be incorrectly upserted with no time zone information. Because of the use of the `...(timeZone ? { timeZone } : undefined)` idiom, TypeScript type checking did not catch the mistake.
    
    I kept `cron`'s `timeZone` capitalization within Sentry's instrumentation and changed from the `...(timeZone ? { timeZone } : undefined)` idiom so TypeScript could catch mistakes of this sort. (Passing an undefined `timezone` appears to be okay, because Sentry's `node-cron` instrumentation does it.)
    joshkel committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    253e85d View commit details
    Browse the repository at this point in the history