Provides an equivalent R timezone for the DB timezone
cdr_adj_timezone.Rd
Translates between Postgres, Sqlite, Snowflake & R timezones to adjust for timezone treatment between different databases
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')
Examples
if (FALSE) {
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)
}