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

pg dat.NullTime still causes 'cannot parse time errors' (Different format for timestamps without timezone) #41

Open
vinzenz opened this issue Mar 2, 2016 · 0 comments

Comments

@vinzenz
Copy link

vinzenz commented Mar 2, 2016

dat_test=# create table test (time timestamp without time zone NOT NULL DEFAULT (now() AT TIME ZONE 'utc'), name TEXT NOT NULL);
CREATE TABLE
dat_test=# insert into test (name) VALUES('Hello');
INSERT 0 1
dat_test=# select row_to_json(fields.*) FROM (SELECT * FROM test) as fields;
                     row_to_json                      
------------------------------------------------------
 {"time":"2016-03-02T10:30:26.256081","name":"Hello"}
(1 row)

It seems like that postgres, at least with version 9.5, if using a row without timestamp without time zone
reports the data in the above format

When adding "2006-01-02T15:04:05.000000" to the supported formats, in types.go, it works

Edit: Additional note: this happens when using SelectDoc only of course but I think that's clear to you when you see the row_to_json

@vinzenz vinzenz changed the title pg dat.NullTime still causes 'cannot parse time errors' (New format) pg dat.NullTime still causes 'cannot parse time errors' (Different format for timestamps without timezone) Mar 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant