BUG #15127: epoch lies 1 hour ahead

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: rgc(at)rgc1(dot)inka(dot)de
Subject: BUG #15127: epoch lies 1 hour ahead
Date: 2018-03-22 13:22:29
Message-ID: 152172494965.9509.10320952862957414465@wrigleys.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: 15127
Logged by: Claus Regelmann
Email address: rgc(at)rgc1(dot)inka(dot)de
PostgreSQL version: 10.2
Operating system: Linux
Description:

Hi,
I think there is a bug in 10.2.
Compared to my old 9.1.18 installation, extracted epoch values lie 1h
ahead.

Claus
--------------------------------------------------------
xxx(at)eragon-rgc:~# psql -U postgres pmacct
psql (10.2)
Type "help" for help.

pmacct=# show time zone;
TimeZone
---------------
Europe/Berlin
(1 row)

pmacct=# select *, extract(epoch from stamp_inserted),
abstime(stamp_inserted) from acct order by stamp_inserted desc limit 5;
ip_src | ip_dst | port_src | port_dst | ip_proto | packets
| bytes | stamp_inserted | stamp_updated | date_part |
abstime
----------------+----------------+----------+----------+----------+---------+-------+---------------------+---------------------+------------+------------------------
192.168.4.242 | 192.53.103.108 | 123 | 123 | 17 | 1
| 76 | 2018-03-22 11:50:00 | 2018-03-22 11:55:01 | 1521719400 |
2018-03-22 11:50:00+01
192.53.103.108 | 192.168.4.242 | 123 | 123 | 17 | 1
| 76 | 2018-03-22 11:50:00 | 2018-03-22 11:55:01 | 1521719400 |
2018-03-22 11:50:00+01
192.168.4.242 | 192.53.103.103 | 123 | 123 | 17 | 1
| 76 | 2018-03-22 11:45:00 | 2018-03-22 11:50:01 | 1521719100 |
2018-03-22 11:45:00+01
192.53.103.103 | 192.168.4.242 | 123 | 123 | 17 | 1
| 76 | 2018-03-22 11:45:00 | 2018-03-22 11:50:01 | 1521719100 |
2018-03-22 11:45:00+01
192.168.4.242 | 185.222.211.35 | 22 | 59771 | 6 | 1
| 44 | 2018-03-22 11:40:00 | 2018-03-22 11:45:01 | 1521718800 |
2018-03-22 11:40:00+01
(5 rows)

pmacct=# \q
xxx(at)eragon-rgc:~# date -d @1521719400
Thu Mar 22 12:50:00 CET 2018
xxx(at)eragon-rgc:~#
------------------------------------------------------
xxx(at)rgc1:~$ psql -d pmacct -U postgres
psql (9.1.18)
Type "help" for help.

pmacct=# show time zone;
TimeZone
---------------
Europe/Berlin
(1 row)

pmacct=# select *, extract(epoch from stamp_inserted),
abstime(stamp_inserted) from acct order by stamp_inserted desc limit 5;
ip_src | ip_dst | port_src | port_dst | ip_proto | packets
| bytes | stamp_inserted | stamp_updated | date_part |
abstime
----------------+----------------+----------+----------+----------+---------+-------+---------------------+---------------------+------------+------------------------
10.1.1.73 | 169.45.214.238 | 50396 | 5222 | 6 | 9
| 1039 | 2018-03-22 11:50:00 | 2018-03-22 11:55:01 | 1521715800 |
2018-03-22 11:50:00+01
169.45.214.238 | 10.1.1.73 | 5222 | 50396 | 6 | 5
| 320 | 2018-03-22 11:50:00 | 2018-03-22 11:55:01 | 1521715800 |
2018-03-22 11:50:00+01
192.168.4.240 | 217.160.82.45 | 59365 | 53 | 17 | 1
| 90 | 2018-03-22 11:50:00 | 2018-03-22 11:55:01 | 1521715800 |
2018-03-22 11:50:00+01
192.168.4.240 | 217.160.80.193 | 33014 | 53 | 17 | 1
| 73 | 2018-03-22 11:50:00 | 2018-03-22 11:55:01 | 1521715800 |
2018-03-22 11:50:00+01
192.168.4.240 | 156.154.127.65 | 57709 | 53 | 17 | 1
| 74 | 2018-03-22 11:50:00 | 2018-03-22 11:55:01 | 1521715800 |
2018-03-22 11:50:00+01
(5 rows)

pmacct=# \q
xxx(at)rgc1:~$ date -d @1521715800
Thu Mar 22 11:50:00 CET 2018
xxx(at)rgc1:~$

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2018-03-22 14:25:01 BUG #15128: Erroneous inner query is executing with wrong results
Previous Message David Irving 2018-03-22 11:09:58 JDBC issue - 2 ResultSets getting data via a single Connection - the date functions interact.