View source: R/cdr_adj_timezone.R
cdr_adj_timezone | R Documentation |
Translates between Postgres, Sqlite, Snowflake & R timezones to adjust for timezone treatment between different databases
cdr_adj_timezone(conn_pool)
conn_pool |
database connection of type pool |
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')
an OlsonNames() timezone for R and lubridate
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.