Skip to content

Inconsistent use of `received_dt` and `timestamp` on the notifications page

Hot Potato records two timestamps for each notification. The time it was received by Hot Potato received_dt, and the time given to Hot Potato by the monitoring server.

The most prominent time display on the notifications page is created from the localised received_dt. This only depends on the timezone of the user.

However, the time used in the copy-summary button is the timestamp. This is dependant on the timezone sent by the server, or, if the server does not send a timezone, on the timezone as set in Hot Potato. If the server does not set a timezone and the default timezone does not match the server's timezone then this value will be incorrect and different to the received_dt value.


> SELECT received_dt FROM notification_log WHERE id = '490903591470432257';
            received_dt
+----------------------------------+
  2019-09-30 22:24:47.008679+00:00
(1 row)

Time: 1.756753ms

> SELECT json->'timestamp' FROM notification_log WHERE id = '490903591470432257';
        ?column?
+-----------------------+
  "2019-09-30 09:24:44"
(1 row)

Time: 1.555831ms
Edited by Zac Pullar-Strecker
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information