Dear Easymorphers,
I have a problem with the following situation and hope that you can help me out.
Assume that I have a table in a PostgreSQL-database with table key timestamp WITH TIME zone (just to show the problem). The CREATE-statement is:
CREATE TABLE
“postgres”.“public”.“Summertime”
(
“date” TIMESTAMP WITH TIME zone,
“value” INTEGER,
PRIMARY KEY (“date”)
)
;
Now, I insert two records which are exactly at the point where summertime ends.
INSERT
INTO
“public”.“Summertime”
(
“date”,
“value”
)
VALUES
(
‘2019-10-27T02:05:06+01:00’,
1
);INSERT
INTO
“public”.“Summertime”
(
“date”,
“value”
)
VALUES
(
‘2019-10-27T02:05:06+02:00’,
2
);
The result is as follows:
So, I have two records with the same timestamp but different time zones.
Now, I created a little project for demonstration purposes. Just three steps:
- Import from database
- Database command (Delete all rows)
- Export to database
Summertime.morph (2.5 KB)
At the first step, the information about summertime (or not) gets lost.
When trying to write back the records, I receive a duplicate key error.
Now, my question is: is there a possibility to read the correct timestamp (with the time zone) and - what is even more important- to write back from easymorph with the time zone?