-
Notifications
You must be signed in to change notification settings - Fork 937
committed failing encode/decode FormatTimestamp/ParseTimestamp test #605
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
base: master
Are you sure you want to change the base?
Conversation
|
This PR really needs some background information. Why is this a problem? |
|
@johto whoops sorry was in progress writing up an issue with the reasoning behind the test case. |
|
Why don't you include the issue in this PR description (and commit message)? You're making it somewhat more difficult than it needs to be by making it necessary to chase down the issue link (particularly for a future source code reader). |
|
@tamird Hey, yeah I had written the pr first, then wrote up the issue, then edited the description of the PR to include the issue number (#606). I didn't go through all the formalities at first because I about 90% expected I was just doing it wrong and it wasn't an issue with lib/pq, so sorry for the sloppiness. To clarify here as well: DescriptionParsing the output of FormatTimestamp with ParseTimestamp is not possible. ExpectedBased on the documentation:
You would expect Parse to handle the output of Format ActualIt errors during parse. I've also included a test that checks that parsed timestamp equals the input timestamp, however I am not sure that is possible and/or right, depending on timezones, rounding, etc. |
|
Thanks, but I would prefer if you could include the information in the commit message. It can be pretty frustrating, when reading the output of |
…lib#606 Description Parsing the output of FormatTimestamp with ParseTimestamp is not possible. * Expected Based on the documentation: FormatTimestamp formats t into Postgres' text format for timestamps. ParseTimestamp parses Postgres' text format. You would expect Parse to handle the output of Format * Actual It errors during parse. I've also included a test that checks that parsed timestamp equals the input timestamp, however I am not sure that is possible and/or right, depending on timezones, rounding, etc. * Additional Notes What Postgresql produces from a timestamptz: 2017-04-26 01:09:32.232463+00 What FormatTimestamp produces: 2017-04-28 18:25:05.070114191Z
|
@tamird got it, I just amended the commit message to have all the info in it as well. |
Documented the corresponding issue here #606