Skip to content

Commit 19e45cd

Browse files
committed
changes to allow time zone propagation
1 parent 437803b commit 19e45cd

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

R/parse.R

+4
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,19 @@ ensure_column <- function(data, default, name) {
5858
# manual fix because vctrs::vec_cast cannot cast double -> datetime or char -> datetime
5959
col <- coerce_datetime(col, default, name = name)
6060
}
61+
6162
if (inherits(default, "fs_bytes") && !inherits(col, "fs_bytes")) {
6263
col <- coerce_fsbytes(col, default)
6364
}
65+
6466
if (inherits(default, "integer64") && !inherits(col, "integer64")) {
6567
col <- bit64::as.integer64(col)
6668
}
69+
6770
if (inherits(default, "list") && !inherits(col, "list")) {
6871
col <- list(col)
6972
}
73+
7074
col <- vctrs::vec_cast(col, default, x_arg = name)
7175
}
7276
data[[name]] <- col

R/ptype.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NA_datetime_ <- # nolint: object_name_linter
2-
vctrs::new_datetime(NA_real_, tzone = "UTC")
2+
vctrs::new_datetime(NA_real_, tzone = Sys.timezone())
33
NA_list_ <- # nolint: object_name_linter
44
list(list())
55

tests/testthat/test-content.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ test_that("get_log() gets job logs", {
397397
source = c("stderr", "stderr", "stderr"),
398398
timestamp = structure(
399399
c(1733512169.9480169, 1733512169.9480703, 1733512169.9480758),
400-
tzone = "UTC",
400+
tzone = Sys.timezone(),
401401
class = c("POSIXct", "POSIXt")
402402
),
403403
data = c(

tests/testthat/test-get.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ test_that("get_vanity_urls() works", {
202202
1602623489,
203203
1677679943
204204
),
205-
tzone = "UTC",
205+
tzone = Sys.timezone(),
206206
class = c("POSIXct", "POSIXt")
207207
)
208208
)

0 commit comments

Comments
 (0)