Re: BUG #18993: [BUG] Unreachable code in pg_next_dst_boundary()

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: gorcom2012@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2025-07-21T14:29:32Z
Lists: pgsql-bugs
On Mon, Jul 21, 2025 at 12:29:16PM +0000, PG Bug reporting form wrote:
> In pg_next_dst_boundary() (src/timezone/localtime.c), the following
> condition can never be true:
> ```
> if (tcycles - icycles >= 1 || icycles - tcycles >= 1)
>     return -1;
> ```
> This is unreachable because icycles is assigned directly from tcycles.

I see the following upstream commit and discussion related to this:

	https://github.com/eggert/tz/commit/b0bf6d8
	https://mm.icann.org/pipermail/tz/2013-August/019493.html

-- 
nathan