BUG #18883: Epoch issue

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: ravi105173(at)gmail(dot)com
Subject: BUG #18883: Epoch issue
Date: 2025-04-08 12:00:14
Message-ID: 18883-2c45e318b3a3e513@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 18883
Logged by: RAVI KANT BHUSHAN
Email address: ravi105173(at)gmail(dot)com
PostgreSQL version: 16.1
Operating system: Windows 10
Description:

Number of days calculation using EPOCH is not providing right answer:

Query: SELECT (EXTRACT(EPOCH FROM ('2025-04-08 11:25:01'::timestamp -
'2025-03-13 15:33:30'::timestamp)) / 86400)::INT
==> output is 26, but right answer is 25 days

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2025-04-08 12:29:53 Re: BUG #18883: Epoch issue
Previous Message Thomas Munro 2025-04-08 11:09:54 Re: BUG #18882: Unexpected write skew at SERIALIZABLE with psycopg2.connect()