RPostgres should respect system timezone rather than default to UTC
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 343
- Forks
- 82
- Avg merge
- 11h 26m
- Merged PRs (30d)
- 9
Description
When connecting to a Postgres backend server, RPostgres sets the timezone for the connection to UTC by default (see for example #222). This is odd behaviour, as virtually any other database abstraction system defaults to either not setting the time zone and thus using the Postgres backend server timezone OR defaulting to using the user's system time zone.
The consequence of setting timezone="UTC" by default leads to unexpected behaviour (not wrong behaviour, just unexpected). A better option to me seems to default to the user's system time zone. This should not be hard to implement (although systems might differ in how they store TZ information, e.g. environmental variable TZ or in /etc/timezone.
...unless I'm simply overlooking something and UTC is actually appropriate.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing where RPostgres sets timezone="UTC" during connection setup, using the behavior referenced in #222 as context. Compare the available system-timezone sources across supported environments and confirm the intended default with PostgreSQL behavior. Done means new connections no longer force UTC by default and timezone handling is covered by the relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, r
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100