From 52d0226b9ba12ef5efa9f23abc87457fcf2d9636 Mon Sep 17 00:00:00 2001 From: Damien Baty Date: Thu, 23 Apr 2026 12:43:51 +0200 Subject: [PATCH] Hide timezone notice when local and server timezones are the same This takes space and is not very useful. Now the notice is only printed when the local timezone is different from the server timezone, for example: Using local time zone Europe/Paris (server uses Etc/UTC) Use `set time zone ` to override, or set `use_local_timezone = False` in the config Fixes #1579. --- changelog.rst | 1 + pgcli/main.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.rst b/changelog.rst index 66e9a6898..a3fde4742 100644 --- a/changelog.rst +++ b/changelog.rst @@ -11,6 +11,7 @@ Features: Bug fixes: ---------- * Add `VERSION` to built-in function completion so `SELECT VERSION();` is suggested. +* Hide timezone notice at startup when local and server timezones are the same. 4.4.0 (2025-12-24) ================== diff --git a/pgcli/main.py b/pgcli/main.py index d49c86a66..149702506 100644 --- a/pgcli/main.py +++ b/pgcli/main.py @@ -1646,7 +1646,7 @@ def echo_error(msg: str): if local_tz is None: echo_error("No local time zone configuration found\n") - else: + elif local_tz != server_tz: click.secho( f"Using local time zone {local_tz} (server uses {server_tz})", fg="green",