You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am storing Items that have timestamp property with type java.time.Instant . I have also stored items that occurred during Daylight saving time (DST) switch (eg. 2019.03.31). I noticed that when I query items over interval when DST happened it returns me different results.
Then the first five queries return me exactly same values as I stored.
But the sixth and next queries return me values below
Item(3,2019-03-31T01:59:38.848Z,12)
Item(4,2019-03-31T03:00:03.377Z,13) // this should have 2019-03-31T02:00:03.377Z
Item(7,2019-03-31T03:59:55.770Z,16) // this should have 2019-03-31T02:59:55.770Z
Item(8,2019-03-31T03:00:07.335Z,17)
I am using:
Java 11
Scala 2.13.1
Slick 3.3.2
Postgres 9.6
Why query returns me different results. How to fix it? Thanks.
CREATE SCHEMA IF NOT EXISTS test_schema;
CREATE TABLE test_schema.items (
id SERIAL NOT NULL PRIMARY KEY,
timestamp TIMESTAMP NOT NULL,
value INT NOT NULL
);
CREATE INDEX items_timestamp_index ON test_schema.items (timestamp);
I am storing Items that have
timestamp
property with typejava.time.Instant
. I have also stored items that occurred during Daylight saving time (DST) switch (eg. 2019.03.31). I noticed that when I query items over interval when DST happened it returns me different results.For example, I store items below:
Then the first five queries return me exactly same values as I stored.
But the sixth and next queries return me values below
I am using:
Java 11
Scala 2.13.1
Slick 3.3.2
Postgres 9.6
Why query returns me different results. How to fix it? Thanks.
I wrote a simple example to reproduce this issue.
create_table.sql --------------------------------------------
Item.scala ----------------------------------------------------
SlickDal.scala -------------------------------------------------
SlickDalTest.scala --------------------------------------------
The text was updated successfully, but these errors were encountered: