{"record":{"id":"c19a631cd1d13793","repo":"deepseek-ai/deepseek-harness","slug":"browser-time-zone-must-be-canonical-json-string","errorCode":null,"errorMessage":"browser time zone must be canonical: ${JSON.stringify(value)}","messagePattern":"browser time zone must be canonical: (.+?)","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/context/time-context/src/request-zone.ts","lineNumber":37,"sourceCode":"    && typeof source.rpcId === 'string'\n    && 'clientTimeZone' in source\n    && typeof source.clientTimeZone === 'string'\n    ? source.clientTimeZone\n    : undefined\n  if (value === undefined) return undefined\n  if (value !== 'UTC' && !IANA_TIME_ZONE.test(value)) {\n    throw new TypeError(\n      `browser time zone must be canonical UTC or IANA Area/Location: ${JSON.stringify(value)}`,\n    )\n  }\n  let canonical: string\n  try {\n    canonical = new Intl.DateTimeFormat('en-US', { timeZone: value }).resolvedOptions().timeZone\n  } catch (error: unknown) {\n    throw new TypeError(`browser time zone is unsupported: ${JSON.stringify(value)}`, { cause: error })\n  }\n  if (canonical !== value) {\n    throw new TypeError(`browser time zone must be canonical: ${JSON.stringify(value)}`)\n  }\n  return value\n}\n\n/**\n * Derive the unique, mixed, or missing browser zone for one open turn.\n * @param messages - Entered and proposed user messages belonging to the turn.\n * @returns Sorted, duplicate-free browser-zone facts.\n * @throws TypeError when a user-rpc source carries an invalid or noncanonical zone.\n */\nexport function deriveBrowserTimeZoneContext(\n  messages: readonly UserMessage[],\n): BrowserTimeZoneContext {\n  const timeZones = [...new Set(messages.flatMap((message) => {\n    const timeZone = browserTimeZone(message)\n    return timeZone === undefined ? [] : [timeZone]\n  }))].sort()\n  const [timeZone, ...remaining] = timeZones","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/context/time-context/src/request-zone.ts#L19-L55","documentation":"Error \"browser time zone must be canonical: ${JSON.stringify(value)}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/context/time-context/src/request-zone.ts:37 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the canonical form of the time zone value."],"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"}