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

Handling of timestamps without time zones #178

Closed
hannes opened this issue Sep 4, 2019 · 3 comments
Closed

Handling of timestamps without time zones #178

hannes opened this issue Sep 4, 2019 · 3 comments

Comments

@hannes
Copy link

hannes commented Sep 4, 2019

The roundtrip_timestamp test explicitly allows the roundtrip timestamps to carry a different time zone when returned, which makes a lot of sense. For example, in DuckDB, timestamps are always stored as UTC and are returned accordingly. However, the local column does not have a time zone (NULL is set). The transform function does convert the returned columns except the local column, and because DuckDB returns this as UTC as well, the test fails.

I think the result transformer should also convert the local column, or am I missing something?

See

roundtrip_timestamp = function(ctx) {

@krlmlr
Copy link
Member

krlmlr commented Sep 5, 2019

Specifically,

zoned <- dates & (names(out) != "local")
looks odd. We should transform both input and output before comparing in this case.

@krlmlr
Copy link
Member

krlmlr commented Dec 25, 2020

The "roundtrip_timestamp" test now passes in duckdb.

@krlmlr krlmlr closed this as completed in a434004 Dec 25, 2020
krlmlr added a commit that referenced this issue Oct 31, 2021
DBItest 1.7.1

- Many tests now emit simpler stack traces, because the connection is opened by the test driver and not by the test itself (#187). Reduce usage of `with_remove_test_table()` for better stack traces on error (#196). Remove `with_*connection()` (#193).
- `test_some()` shows DBI code via dblog (#217) if `dblog = TRUE` (#226).
- New `"bind_date_integer"`, `"bind_time_seconds"` and `"bind_time_hours"` tests (#218).
- New `create_table_as` tweak (#131).
- `"roundtrip_time"` and `"append_roundtrip_time"` tests now also test values of class `"difftime"` with units other than `"secs"` (#199).
- All tables created by the tests have the `"dbit"` prefix. Almost all tests now use random table names to avoid collisions and unrelated test failures (#197).
- `"roundtrip_timestamp"` tests now accept a time zone set by the database backend (#178, #198).
- Support more than one class of each type in DBI backend packages.

- Fix input dataset in `"overwrite_table_missing"` test (#210, @martinstuder).
- Use original test name to decide if a test is skipped (#225).
- Fix reexport test: skip if package is not installed, remove checks for deprecated functions and functions not reexported (#203).

- Requires DBI 1.1.1.
- Test odbc as part of the backend tests (#228).
- Dynamic build matrix for backends (#221).
- Compatibility with testthat 3.0.0 (#207).
- Switch to GitHub Actions (#201).
@github-actions
Copy link

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants