tests/testthat/helper-in-time-zone.R

inTimeZone <- function(tz, code) {
  previous_tz <- Sys.getenv("TZ", Sys.timezone())
  tryCatch({
    Sys.setenv(TZ=tz)
    eval(code)
  }, finally={
    Sys.setenv(TZ=previous_tz)
  })
}

Try the dbx package in your browser

Any scripts or data that you put into this service are public.

dbx documentation built on Jan. 17, 2021, 9:06 a.m.