{"record":{"id":"f59576fdd2e90c38","repo":"mikefarah/yq","slug":"could-not-load-tz-v-w","errorCode":null,"errorMessage":"could not load tz [%v]: %w","messagePattern":"could not load tz \\[(.+?)\\]: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/yqlib/operator_datetime.go","lineNumber":109,"sourceCode":"\t\tnode.Key = candidate.Key\n\t\tresults.PushBack(node)\n\t}\n\n\treturn context.ChildContext(results), nil\n}\n\nfunc tzOp(d *dataTreeNavigator, context Context, expressionNode *ExpressionNode) (Context, error) {\n\ttimezoneStr, err := getStringParameter(\"timezone\", d, context, expressionNode.RHS)\n\tlayout := context.GetDateTimeLayout()\n\n\tif err != nil {\n\t\treturn Context{}, err\n\t}\n\tvar results = list.New()\n\n\ttimezone, err := time.LoadLocation(timezoneStr)\n\tif err != nil {\n\t\treturn Context{}, fmt.Errorf(\"could not load tz [%v]: %w\", timezoneStr, err)\n\t}\n\n\tfor el := context.MatchingNodes.Front(); el != nil; el = el.Next() {\n\t\tcandidate := el.Value.(*CandidateNode)\n\n\t\tparsedTime, err := parseDateTime(layout, candidate.Value)\n\t\tif err != nil {\n\t\t\treturn Context{}, fmt.Errorf(\"could not parse datetime of [%v] using layout [%v]: %w\", candidate.GetNicePath(), layout, err)\n\t\t}\n\t\ttzTime := parsedTime.In(timezone)\n\n\t\tresults.PushBack(candidate.CreateReplacement(ScalarNode, candidate.Tag, tzTime.Format(layout)))\n\t}\n\n\treturn context.ChildContext(results), nil\n}\n\nfunc parseUnixTime(unixTime string) (time.Time, error) {","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/mikefarah/yq/blob/8b5af0694bb82b41d4ae180fac9972029066f90a/pkg/yqlib/operator_datetime.go#L91-L127","documentation":"The tz operator passed its timezone argument to time.LoadLocation and the IANA database lookup failed. The named zone (shown in brackets) is not a valid IANA timezone identifier or the zoneinfo database is unavailable on this system; the %w wraps Go's own error detail.","triggerScenarios":"Thrown at pkg/yqlib/operator_datetime.go:109 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a valid IANA name such as \"Australia/Sydney\" or \"UTC\" (not \"AEST\", not \"GMT+10\")","Check spelling of the zone name","On systems without tzdata, ensure Go can find it (embed tzdata or set ZONEINFO)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8b5af0694bb82b41d4ae180fac9972029066f90a","analyzedAt":"2026-09-05T10:57:22.766Z","contentChangedAt":"2026-09-05T10:57:22.766Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}