TimeZone
Read PG 18 manual ↗Sets the time zone for displaying and interpreting time stamps.
- Type
- string
- Context
- user
- Measured default
- GMT
- Unit
- —
- Metadata snapshot
- 18
Definition PG 18 manual
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.
Measured default history
| Version interval | Default |
|---|---|
| 9.0 – 9.0 | UNKNOWN |
| 9.1 – 9.1 | Not specified |
| 9.2 – 19 | GMT |
Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗
How it works
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.
Operational considerations
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.
Workload guidance
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.
Version history 2
- PG 9.1 → 9.2changed
- PG 9.0 → 9.1changed
Related entries
Further reading
Definition snapshot: english-manuals:1395122064f58b278e7e47748fc… · English manual source