Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
seconds (configurable with `cli.progress_llm_interval`), plus a final
line. This is implemented by the new `llm` progress handler.

* The `logger` progress handler and the `pb_timestamp` progress variable now report timestamps in UTC, matching their `+00:00` suffix. Previously they used local time.

* New `cli_extract_vars()` function to extract variable and function names
from cli format strings without evaluating them (#750, @MichaelChirico).

Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ is_yes <- function(x) {
}

format_iso_8601 <- function(p) {
format(p, "%Y-%m-%dT%H:%M:%S+00:00")
format(p, "%Y-%m-%dT%H:%M:%S+00:00", tz = "UTC")
}

has_packages <- function(pkgs) {
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/progress-handler-logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
Code
logger_out(bar, "updated")
Output
2021-06-10T13:51:05+00:00 id 13/113 updated
2021-06-10T11:51:05+00:00 id 13/113 updated

4 changes: 3 additions & 1 deletion tests/testthat/test-progress-handler-logger.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ test_that("loggerr_out", {
bar$id <- "id"
bar$current <- 13
bar$total <- 113
local_mocked_bindings(Sys.time = function() .POSIXct(1623325865, tz = "CET"))
local_mocked_bindings(Sys.time = function() {
.POSIXct(1623325865, tz = "Europe/Berlin")
})
expect_snapshot(logger_out(bar, "updated"))
})
Loading