Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#928] Set TZDIR if empty #936

Merged
merged 2 commits into from
Nov 21, 2020
Merged

Conversation

LeeMendelowitz
Copy link
Contributor

This commit fixes #928 for me.

I start R --vanilla and then:

❯ R --vanilla
R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Platform: x86_64-apple-darwin19.6.0 (64-bit)

r$> Sys.getenv("TZDIR")
[1] ""

r$> lubridate::dmy_hm("1 Sep 2020 1:00pm", tz="Africa/Blantyre")
[1] "2020-09-01 13:00:00 CAT"

r$> Sys.getenv("TZDIR")
[1] "/usr/share/zoneinfo"
session_info

r$> devtools::session_info()
─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.0.3 (2020-10-10)
 os       macOS Catalina 10.15.7
 system   x86_64, darwin19.6.0
 ui       unknown
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       America/New_York
 date     2020-11-19

─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 package     * version    date       lib source
 assertthat    0.2.1      2019-03-21 [1] RSPM (R 4.0.3)
 backports     1.2.0      2020-11-02 [1] RSPM (R 4.0.3)
 callr         3.5.1      2020-10-13 [1] RSPM (R 4.0.3)
 cli           2.1.0      2020-10-12 [1] RSPM (R 4.0.3)
 crayon        1.3.4      2017-09-16 [1] RSPM (R 4.0.3)
 desc          1.2.0      2018-05-01 [1] RSPM (R 4.0.3)
 devtools      2.3.2      2020-09-18 [1] CRAN (R 4.0.3)
 digest        0.6.27     2020-10-24 [1] RSPM (R 4.0.3)
 ellipsis      0.3.1      2020-05-15 [1] RSPM (R 4.0.3)
 fansi         0.4.1      2020-01-08 [1] RSPM (R 4.0.3)
 fs            1.5.0      2020-07-31 [1] RSPM (R 4.0.3)
 generics      0.1.0      2020-10-31 [1] RSPM (R 4.0.3)
 glue          1.4.2      2020-08-27 [1] RSPM (R 4.0.3)
 lubridate     1.7.9.9001 2020-11-19 [1] local
 magrittr      1.5        2014-11-22 [1] RSPM (R 4.0.3)
 memoise       1.1.0      2017-04-21 [1] CRAN (R 4.0.3)
 pkgbuild      1.1.0      2020-07-13 [1] RSPM (R 4.0.3)
 pkgload       1.1.0      2020-05-29 [1] RSPM (R 4.0.3)
 prettyunits   1.1.1      2020-01-24 [1] RSPM (R 4.0.3)
 processx      3.4.4      2020-09-03 [1] RSPM (R 4.0.3)
 ps            1.4.0      2020-10-07 [1] RSPM (R 4.0.3)
 R6            2.5.0      2020-10-28 [1] RSPM (R 4.0.3)
 Rcpp          1.0.5      2020-07-06 [1] RSPM (R 4.0.3)
 remotes       2.2.0      2020-07-21 [1] CRAN (R 4.0.3)
 rlang         0.4.8      2020-10-08 [1] RSPM (R 4.0.3)
 rprojroot     1.3-2      2018-01-03 [1] RSPM (R 4.0.3)
 sessioninfo   1.1.1      2018-11-05 [1] CRAN (R 4.0.3)
 testthat      3.0.0      2020-10-31 [1] RSPM (R 4.0.3)
 usethis       1.6.3      2020-09-17 [1] CRAN (R 4.0.3)
 withr         2.3.0      2020-09-22 [1] RSPM (R 4.0.3)

[1] /usr/local/lib/R/4.0/site-library
[2] /usr/local/Cellar/r/4.0.3/lib/R/library

@LeeMendelowitz
Copy link
Contributor Author

@vspinu This PR is a simple fix which resolves this issue for me. I based it off of your previous commits on this issue. Let me know if you have any questions

@vspinu
Copy link
Member

vspinu commented Nov 21, 2020

I think my intent was to call Sys.timezone() on startup, but I paced it in the find_tzdir function. Shall we just call it unconditionally?

@LeeMendelowitz
Copy link
Contributor Author

Sure! I just pushed that change.

@vspinu vspinu merged commit 6c535c8 into tidyverse:master Nov 21, 2020
@vspinu
Copy link
Member

vspinu commented Nov 21, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Timezones not working since the update to R 4.0.3
2 participants