{"action":"closed","issue":{"url":"https://api.github.com/repos/jackc/pgx/issues/143","repository_url":"https://api.github.com/repos/jackc/pgx","labels_url":"https://api.github.com/repos/jackc/pgx/issues/143/labels{/name}","comments_url":"https://api.github.com/repos/jackc/pgx/issues/143/comments","events_url":"https://api.github.com/repos/jackc/pgx/issues/143/events","html_url":"https://github.com/jackc/pgx/issues/143","id":154140982,"number":143,"title":"time.In(location) support","user":{"login":"achun","id":489285,"avatar_url":"https://avatars.githubusercontent.com/u/489285?v=3","gravatar_id":"","url":"https://api.github.com/users/achun","html_url":"https://github.com/achun","followers_url":"https://api.github.com/users/achun/followers","following_url":"https://api.github.com/users/achun/following{/other_user}","gists_url":"https://api.github.com/users/achun/gists{/gist_id}","starred_url":"https://api.github.com/users/achun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achun/subscriptions","organizations_url":"https://api.github.com/users/achun/orgs","repos_url":"https://api.github.com/users/achun/repos","events_url":"https://api.github.com/users/achun/events{/privacy}","received_events_url":"https://api.github.com/users/achun/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-11T01:22:22Z","updated_at":"2016-05-17T10:30:48Z","closed_at":"2016-05-17T10:30:47Z","body":"Hi!\r\nI have idea for *time.Time with support Location in Decode.\r\n\r\n```go\r\nfunc Decode(vr *ValueReader, d interface{}) error {\r\n\tswitch v := d.(type) {\r\n\t// .....\r\n\tcase *time.Time:\r\n\t\tswitch vr.Type().DataType {\r\n\t\tcase DateOid:\r\n\t\t\t*v = decodeDate(vr,(*v).Location())\r\n\t\tcase TimestampTzOid:\r\n\t\t\t*v = decodeTimestampTz(vr)\r\n\t\tcase TimestampOid:\r\n\t\t\t*v = decodeTimestamp(vr,(*v).Location())\r\n\t\tdefault:\r\n\t\t\treturn fmt.Errorf(\"Can't convert OID %v to time.Time\", vr.Type().DataType)\r\n\t\t}\r\n\t// .....\r\n\t}\r\n}\r\n\r\n// and\r\nfunc decodeDate(vr *ValueReader, loc *Location) time.Time {\r\n\t// .....\r\n\treturn time.Date(2000, 1, int(1+dayOffset), 0, 0, 0, 0, loc)\r\n\t// .....\r\n}\r\n```"}}