{"Entry":{"collection":"guc","key":"lc_time","name":"lc_time","aliases":[],"metadata":{"baseline":true,"boot_human":"Not specified","boot_val":null,"category":"Client Connection Defaults / Locale and Formatting","category_zh":"","changed_in":["18"],"changes":[{"documentation_changed":true,"fields":{},"from":"8.0","status":"changed","to":"8.1"},{"documentation_changed":true,"fields":{},"from":"8.2","status":"changed","to":"8.3"},{"documentation_changed":true,"fields":{},"from":"8.3","status":"changed","to":"8.4"},{"documentation_changed":true,"fields":{},"from":"9.5","status":"changed","to":"9.6"},{"documentation_changed":true,"fields":{},"from":"13","status":"changed","to":"14"},{"documentation_changed":true,"fields":{},"from":"16","status":"changed","to":"17"},{"documentation_changed":false,"fields":{"extra_desc":{"from":null,"to":"An empty string means use the operating system setting."}},"from":"17","status":"changed","to":"18"}],"content_hash":"7e97e667118152099edc1ab725614d356ef36aafdf51bae221c2c62b58148cc2","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"C"}],"editorial":{"advice":{"olap":"Pin lc_time for export, reporting, and reproducible analytical jobs; prefer explicit SQL formatting when a file or API has a durable schema.","oltp":"Treat lc_time 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 lc_time."},"mechanism":["lc_time sets the locale for formatting date and time values. An empty string means use the operating system setting. It controls locale-sensitive names and layouts used by formatting functions; DateStyle and TimeZone remain separate controls.","lc_time 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 lc_time 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.","Changing lc_time globally without a rollback plan and a client or operational compatibility test."],"references":[{"title":"PostgreSQL 19 Beta 4: lc_time","url":"https://www.postgresql.org/docs/19/runtime-config-client.html#GUC-LC-TIME"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["DateStyle","IntervalStyle","TimeZone","timezone_abbreviations","log_timezone"],"summary":"lc_time is the PostgreSQL setting that defines the locale for formatting date and time values."},"enumvals":[],"first_version":"7.4","group":"Client Connection Defaults","group_slug":"client","imported_at":"2026-09-27T17:57:31.48397+08:00","intro_commit":{},"key":"lc_time","last_version":"20","max_val":"","min_val":"","name":"lc_time","position":211,"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 locale to use for formatting dates and times, for example with the to_char family of functions.","short_desc_zh":"","source_rev":"english-manuals:c8d934ac757b0aa36539a6dba05efb718bc87d49c48c55c736f8b843ef278f48","unit":"","vartype":"string"}},"Definition":{"Collection":"guc","Key":"lc_time","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"lc_time","SourceRevision":"english-manuals:c8d934ac757b0aa36539a6dba05efb718bc87d49c48c55c736f8b843ef278f48","Facts":{"boot_val":"C","category":"Client Connection Defaults / Locale and Formatting","context":"user","description":"Sets the locale to use for formatting dates and times, for example with the to_char family of functions. Acceptable values are system-dependent; see Section 23.1 for more information. If this variable is set to the empty string (which is the default) then the value is inherited from the execution environment of the server in a system-dependent way.","doc":{"anchor":"GUC-LC-TIME","file":"runtime-config-client.html","lang":"en","sha256":"6be6cc70f29eca4695dc43b2b2b94c75b7e0eaaa2c00273d7a98488917a7edb7","slug":"18"},"documented":true,"enumvals":null,"extra_desc":"An empty string means use the operating system setting.","lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"lc_time","short_desc":"Sets the locale for formatting date and time values.","source":"pg-settings-source-snapshot","unit":null,"vartype":"string"},"ManualEvidence":{"doc":{"anchor":"GUC-LC-TIME","file":"runtime-config-client.html","lang":"en","sha256":"6be6cc70f29eca4695dc43b2b2b94c75b7e0eaaa2c00273d7a98488917a7edb7","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"lc_time","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"lc_time","Summary":"","BodyHTML":"\u003cp\u003e设置用于格式化日期和时间的区域设置，例如用\u003ccode\u003eto_char\u003c/code\u003e函数族。可接受的值是系统相关的；详见\u003ca href=\"/docs/18/locale.html\" rel=\"nofollow\"\u003e第 23.1 节\u003c/a\u003e。如果这个变量被设置为空字符串（默认），那么该值将以一种系统相关的方式从服务器的执行环境中继承。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"57e344dbbb57e5d2b7dd83ea657957b9544fb08c0d94ac0c55c54cd8a0dbd237","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e设置用于格式化日期和时间的区域设置，例如用\u003ccode class=\"function\"\u003eto_char\u003c/code\u003e函数族。可接受的值是系统相关的；详见\u003ca href=\"/docs/18/locale.html\" title=\"23.1. 区域设置支持\"\u003e第 23.1 节\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}
