Skip to content

Commit

Permalink
Use CRAN lubridate and remove workaround (#316)
Browse files Browse the repository at this point in the history
lubridate has now the fix for timezone on macOS. So the workaround for #207 is no more needed.
  • Loading branch information
cderv authored Feb 12, 2021
1 parent a99e7d5 commit 7c56722
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: distill
Title: 'R Markdown' Format for Scientific and Technical Writing
Version: 1.2
Version: 1.2.1
Authors@R: c(
person("JJ", "Allaire", role = c("aut", "cre"), email = "[email protected]",
comment = c(ORCID = "0000-0003-0174-9868")),
Expand Down Expand Up @@ -39,7 +39,7 @@ Imports:
xfun (>= 0.2),
htmltools,
jsonlite (>= 1.3),
lubridate,
lubridate (>= 1.7.9.2),
png,
mime,
rstudioapi,
Expand Down
11 changes: 2 additions & 9 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,8 @@ parse_date <- function(date) {
}

safe_timezone <- function() {
# OS X Catalina (10.15.7) has a corrupt timezone database, protect
# against this by always returning UTC on OSX until we have a
# lubridate fix for this on CRAN
if (is_osx()) {
"UTC"
} else {
tz <- Sys.timezone()
ifelse(is.na(tz), "UTC", tz)
}
tz <- Sys.timezone()
ifelse(is.na(tz), "UTC", tz)
}

time_as_iso_8601 <- function(time) {
Expand Down

0 comments on commit 7c56722

Please sign in to comment.