{"record":{"id":"3f05a2477ed8e45e","repo":"cube-js/cube","slug":"value-value-is-not-valid-for-cubejs-default-t","errorCode":null,"errorMessage":"Value \"${value}\" is not valid for CUBEJS_DEFAULT_TIMEZONE. Must be a valid IANA time zone name, e.g. UTC or America/Los_Angeles.","messagePattern":"Value \"(.+?)\" is not valid for CUBEJS_DEFAULT_TIMEZONE\\. Must be a valid IANA time zone name, e\\.g\\. UTC or America/Los_Angeles\\.","errorType":"validation","errorClass":"InvalidConfiguration","httpStatus":null,"severity":"error","filePath":"packages/cubejs-backend-shared/src/env.ts","lineNumber":359,"sourceCode":"  allowNonStrictDateRangeMatching: () => get('CUBEJS_PRE_AGGREGATIONS_ALLOW_NON_STRICT_DATE_RANGE_MATCH')\n    .default('true')\n    .asBoolStrict(),\n  transpilationWorkerThreadsCount: () => get('CUBEJS_TRANSPILATION_WORKER_THREADS_COUNT')\n    .default('0')\n    .asInt(),\n  // This one takes precedence over CUBEJS_TRANSPILATION_WORKER_THREADS\n  transpilationNative: () => get('CUBEJS_TRANSPILATION_NATIVE')\n    .default('false')\n    .asBoolStrict(),\n  nestedFoldersDelimiter: () => get('CUBEJS_NESTED_FOLDERS_DELIMITER')\n    .default('')\n    .asString(),\n  defaultTimezone: () => {\n    const value = (get('CUBEJS_DEFAULT_TIMEZONE').asString() || '').trim() || 'UTC';\n\n    const timezone = canonicalTimezone(value);\n    if (!timezone) {\n      throw new InvalidConfiguration(\n        'CUBEJS_DEFAULT_TIMEZONE',\n        value,\n        'Must be a valid IANA time zone name, e.g. UTC or America/Los_Angeles.'\n      );\n    }\n\n    return timezone;\n  },\n  preciseDecimalInCubestore: () => get('CUBEJS_DB_PRECISE_DECIMAL_IN_CUBESTORE')\n    .default('false')\n    .asBoolStrict(),\n  refreshKeyLocalTime: () => get('CUBEJS_REFRESH_KEY_LOCAL_TIME')\n    .default('false')\n    .asBoolStrict(),\n\n  /** ****************************************************************\n   * Common db options                                               *\n   ***************************************************************** */","sourceCodeStart":341,"sourceCodeEnd":377,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-backend-shared/src/env.ts#L341-L377","documentation":"Environment validation in env.ts defaultTimezone accessor: the CUBEJS_DEFAULT_TIMEZONE environment variable is set but is not a valid IANA time zone name (validated via Intl/DateTimeFormat), so the default timezone cannot be resolved. Fires at first getEnv('defaultTimezone') call during startup.","triggerScenarios":"Setting CUBEJS_DEFAULT_TIMEZONE to something like 'PST', 'GMT+2', 'US Eastern', or a misspelled zone so canonicalTimezone returns falsy.","commonSituations":"Copy-pasting offsets instead of zone names; typo in a zone like 'America/LosAngeles' (missing underscore); locale-specific zone names from Windows registries.","solutions":["Set CUBEJS_DEFAULT_TIMEZONE to a valid IANA name such as UTC or America/Los_Angeles.","Remove the variable entirely to fall back to UTC as the default timezone.","Check for abbreviations like PST or EST, which are not IANA names and will be rejected."],"exampleFix":"// before\nCUBEJS_DEFAULT_TIMEZONE=EST\n// after\nCUBEJS_DEFAULT_TIMEZONE=America/New_York","handlingStrategy":"validation","validationCode":"const tz = process.env.CUBEJS_DEFAULT_TIMEZONE;\nif (tz) {\n  try { new Intl.DateTimeFormat('en-US', { timeZone: tz }); }\n  catch { throw new Error(`CUBEJS_DEFAULT_TIMEZONE '${tz}' is not a valid IANA time zone`); }\n}","typeGuard":null,"tryCatchPattern":"try {\n  configureTimezones();\n} catch (e) {\n  if (String(e.message).includes('CUBEJS_DEFAULT_TIMEZONE')) {\n    console.error('Set CUBEJS_DEFAULT_TIMEZONE to an IANA name like UTC or America/New_York');\n    process.exit(1);\n  }\n  throw e;\n}","preventionTips":["Prefer UTC unless a specific zone is required.","Test the value with new Intl.DateTimeFormat(..., { timeZone: value }) before deploy.","Never use fixed offsets like GMT+2; use Etc/GMT±h names if needed."],"tags":["configuration","timezone","validation"],"backgroundTag":"invalid-timezone-name","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}