{"record":{"id":"ad0d38f998ae2b46","repo":"deepseek-ai/deepseek-harness","slug":"time-context-failed-to-resolve-the-system-time-zo","errorCode":null,"errorMessage":"time-context: failed to resolve the system time zone","messagePattern":"time-context: failed to resolve the system time zone","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/context/time-context/src/index.ts","lineNumber":156,"sourceCode":"\n/**\n * Register a prepended pre-step listener for the lifetime of `ctx`.\n * @param ctx - plugin context; the listener is disposed with it.\n * @param config - time zone and durable refresh scheduling configuration.\n * @throws when the refresh interval is invalid or the configured or process time zone cannot be resolved.\n */\nexport function apply(ctx: Context, config: Config): void {\n  const timeZone = config.timeZone\n  const refreshIntervalMs = config.refreshIntervalMs\n  validateRefreshInterval(refreshIntervalMs)\n  let fallbackFormatter: Intl.DateTimeFormat\n  try {\n    fallbackFormatter = createTimestampFormatter(timeZone)\n  } catch (error: unknown) {\n    const message = timeZone === undefined\n      ? 'time-context: failed to resolve the system time zone'\n      : `time-context: invalid IANA timeZone ${JSON.stringify(timeZone)}`\n    throw new Error(message, { cause: error })\n  }\n  const fallbackTimeZone = fallbackFormatter.resolvedOptions().timeZone\n  const formatters = new Map<string, Intl.DateTimeFormat>([[fallbackTimeZone, fallbackFormatter]])\n\n  /** Resolve and cache one request-local timestamp formatter. */\n  const formatterFor = (selectedTimeZone: string): Intl.DateTimeFormat => {\n    const existing = formatters.get(selectedTimeZone)\n    if (existing !== undefined) return existing\n    const created = createTimestampFormatter(selectedTimeZone)\n    formatters.set(selectedTimeZone, created)\n    return created\n  }\n\n  ctx.on('agent/pre-step', async (\n    { agent, turn, step, signal },\n    next,\n  ): Promise<PreStepDecision> => {\n    const decision = await next()","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/context/time-context/src/index.ts#L138-L174","documentation":"Error \"time-context: failed to resolve the system time zone\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/context/time-context/src/index.ts:156 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set an explicit IANA timeZone in the configuration."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}