{"Entry":{"collection":"guc","key":"TimeZone","name":"TimeZone","aliases":[],"metadata":{"baseline":true,"boot_human":"Not specified","boot_val":null,"category":"Client Connection Defaults / Locale and Formatting","category_zh":"","changed_in":["9.1","9.2"],"changes":[{"documentation_changed":true,"fields":{},"from":"7.4","status":"changed","to":"8.0"},{"documentation_changed":true,"fields":{},"from":"8.2","status":"changed","to":"8.3"},{"documentation_changed":true,"fields":{"boot_val":{"from":"UNKNOWN","to":null}},"from":"9.0","status":"changed","to":"9.1"},{"documentation_changed":true,"fields":{"boot_val":{"from":null,"to":"GMT"}},"from":"9.1","status":"changed","to":"9.2"}],"content_hash":"90d828f3a5bf3cf7ae54f2a5754a9f1862ce205be1639b26c3f54ad82b8375b7","context":"","default_changed_in":["9.1","9.2"],"default_history":[{"from":"9.0","to":"9.0","value":"UNKNOWN"},{"from":"9.1","to":"9.1","value":"Not specified"},{"from":"9.2","to":"19","value":"GMT"}],"editorial":{"advice":{"olap":"Pin TimeZone for export, reporting, and reproducible analytical jobs; prefer explicit SQL formatting when a file or API has a durable schema.","oltp":"Treat TimeZone as an application contract, not a performance knob. Standardize it per role or connection pool and keep wire formats explicit where clients parse text.","small":"Keep the upstream or locale-derived value unless a client requires another one. A smaller server gains no capacity from changing TimeZone."},"mechanism":["TimeZone sets the time zone for displaying and interpreting time stamps. It affects timestamptz rendering and timestamp input lacking an explicit zone, while the stored instant remains independent of the display zone.","TimeZone is a USER-context setting. An authorized role can change it for a session, while ALTER ROLE or ALTER DATABASE can establish a default for future sessions.","It changes representation, parsing, or locale behavior at the client boundary rather than physical storage. Coordinate it with the other locale and formatting settings and with driver-native binary or typed protocols."],"pitfalls":["Changing TimeZone in one session and assuming role defaults, database defaults, or other pooled sessions changed with it.","Assuming a presentation setting changes stored values or server-side type semantics.","Changing a role or database default without testing text-parsing clients, exports, and pooled sessions.","Comparing rendered timestamps without preserving the original instant and explicit zone context."],"references":[{"title":"PostgreSQL 19 Beta 4: TimeZone","url":"https://www.postgresql.org/docs/19/runtime-config-client.html#GUC-TIMEZONE"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["DateStyle","IntervalStyle","lc_time","timezone_abbreviations","log_timezone"],"summary":"TimeZone is the PostgreSQL setting that defines the time zone for displaying and interpreting time stamps."},"enumvals":[],"first_version":"7.4","group":"Client Connection Defaults","group_slug":"client","imported_at":"2026-09-27T17:57:30.725649+08:00","intro_commit":{},"key":"timezone","last_version":"20","max_val":"","min_val":"","name":"TimeZone","position":2,"present_in":["7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"short_desc":"Sets the time zone for displaying and interpreting time stamps.","short_desc_zh":"","source_rev":"english-manuals:893e62c4fd58d22e5298d4f3d6891a94ba3a1cdf9c163f4ea6d3cc54ddf298cd","unit":"","vartype":"string"}},"Definition":{"Collection":"guc","Key":"TimeZone","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"TimeZone","SourceRevision":"english-manuals:893e62c4fd58d22e5298d4f3d6891a94ba3a1cdf9c163f4ea6d3cc54ddf298cd","Facts":{"boot_val":"GMT","category":"Client Connection Defaults / Locale and Formatting","context":"user","description":"Sets the time zone for displaying and interpreting time stamps. The built-in default is GMT, but that is typically overridden in postgresql.conf; initdb will install a setting there corresponding to its system environment. See Section 8.5.3 for more information.","doc":{"anchor":"GUC-TIMEZONE","file":"runtime-config-client.html","lang":"en","sha256":"6be6cc70f29eca4695dc43b2b2b94c75b7e0eaaa2c00273d7a98488917a7edb7","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"TimeZone","short_desc":"Sets the time zone for displaying and interpreting time stamps.","source":"pg-settings-source-snapshot","unit":null,"vartype":"string"},"ManualEvidence":{"doc":{"anchor":"GUC-TIMEZONE","file":"runtime-config-client.html","lang":"en","sha256":"6be6cc70f29eca4695dc43b2b2b94c75b7e0eaaa2c00273d7a98488917a7edb7","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"TimeZone","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"TimeZone","Summary":"","BodyHTML":"\u003cp\u003e设置用于显示和解释时间戳的时区。内置默认值是\u003ccode\u003eGMT\u003c/code\u003e，但是它通常会在\u003ccode\u003epostgresql.conf\u003c/code\u003e中被覆盖；\u003cspan\u003einitdb\u003c/span\u003e将安装一个对应于其系统环境的设置。详见\u003ca href=\"/docs/18/datatype-datetime.html#DATATYPE-TIMEZONES\" rel=\"nofollow\"\u003e第 8.5.3 节\u003c/a\u003e。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"6d5df8f574a6c9761f5c52416a8de7050a5edd5fbf04926a2ca2e3951dd420cc","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e设置用于显示和解释时间戳的时区。内置默认值是\u003ccode class=\"literal\"\u003eGMT\u003c/code\u003e，但是它通常会在\u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e中被覆盖；\u003cspan class=\"application\"\u003einitdb\u003c/span\u003e将安装一个对应于其系统环境的设置。详见\u003ca href=\"/docs/18/datatype-datetime.html#DATATYPE-TIMEZONES\" title=\"8.5.3. 时区\"\u003e第 8.5.3 节\u003c/a\u003e。\u003c/p\u003e","doc_same_as":""}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
