Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The type 'timetz' does not work correctly #5

Open
jd-zhang opened this issue Jun 16, 2021 · 2 comments
Open

The type 'timetz' does not work correctly #5

jd-zhang opened this issue Jun 16, 2021 · 2 comments

Comments

@jd-zhang
Copy link
Contributor

Issue migrated from trac ticket # 104

component: kunlun-storage | priority: major

2021-06-16 10:54:35: @jd-zhang created the issue


sql code:

DROP TABLE if exists TIMETZ_TBL;
CREATE TABLE TIMETZ_TBL (f1 time(2) with time zone);
INSERT INTO TIMETZ_TBL VALUES ('00:01 PDT');
INSERT INTO TIMETZ_TBL VALUES ('01:00 PDT');
INSERT INTO TIMETZ_TBL VALUES ('02:03 PDT');
INSERT INTO TIMETZ_TBL VALUES ('07:07 PST');
INSERT INTO TIMETZ_TBL VALUES ('08:08 EDT');
INSERT INTO TIMETZ_TBL VALUES ('11:59 PDT');
INSERT INTO TIMETZ_TBL VALUES ('12:00 PDT');
INSERT INTO TIMETZ_TBL VALUES ('12:01 PDT');
INSERT INTO TIMETZ_TBL VALUES ('23:59 PDT');
INSERT INTO TIMETZ_TBL VALUES ('11:59:59.99 PM PDT');
INSERT INTO TIMETZ_TBL VALUES ('2003-03-07 15:36:39 America/New_York');
INSERT INTO TIMETZ_TBL VALUES ('2003-07-07 15:36:39 America/New_York');

select * from TIMETZ_TBL;
tdb1=# select * from TIMETZ_TBL;
f1
00:01:00+00
01:00:00+00
02:03:00+00
07:07:00+00
08:08:00+00
11:59:00+00
12:00:00+00
12:01:00+00
23:59:00+00
23:59:59.99+00
15:36:39+00
15:36:39+00

All the timezone info is removed when putting into the table.

@jd-zhang
Copy link
Contributor Author

2021-06-28 19:09:50: @david-zhao commented


timetz is discouraged to be used according to pg doc because it's logically unreasonable, so let's fix this some time in future.

timestamptz has good timezone support.

@jd-zhang
Copy link
Contributor Author

2021-06-28 19:10:14: @david-zhao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants