cdr_adj_timezone: Provides an equivalent R timezone for the DB timezone

View source: R/cdr_adj_timezone.R

cdr_adj_timezoneR Documentation

Provides an equivalent R timezone for the DB timezone

Description

Translates between Postgres, Sqlite, Snowflake & R timezones to adjust for timezone treatment between different databases

Usage

cdr_adj_timezone(conn_pool)

Arguments

conn_pool

database connection of type pool

Details

Postgres timezone ref: 'https://www.postgresql.org/docs/8.1/datetime-keywords.html'

Snowflake is always: 'UTC'

Sqlite is always an empty string: "" (not 'UTC')

Value

an OlsonNames() timezone for R and lubridate

Examples

## Not run: 
conn_pool <- pool::dbPool(
  DBI::dbConnect( RPostgreSQL::PostgreSQL(),
                  dbname = "test",
                  host = "localhost",
                  port = "5432",
                  user = Sys.getenv('postgres_username'),
                  password = Sys.getenv('postgres_password'))
)
crudr:::cdr_adj_timezone(conn_pool)
pool::poolClose(conn_pool)

## End(Not run)


eauleaf/crudr documentation built on Jan. 29, 2024, 4:39 p.m.