Skip to content

Commit

Permalink
updated test-ic-extract to set tz=Europe/London for both the test and…
Browse files Browse the repository at this point in the history
… comparator datetime
  • Loading branch information
silverfoxdoc committed Apr 27, 2024
1 parent 1ef66d7 commit 30b5b4b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/testthat/test-ic-extract.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
context("test-ic-extract")

# now that we are setting zulu time strings to zulu time in ic_date() to test against a specific
# time zone datetime we need to set it first
test_that("ic_extract works", {
expect_equal(ic_extract(ical_example, "DTSTART"),
as.POSIXct("2018-08-09 16:00:00 BST"))
test_datetime <- ic_extract(ical_example, "DTSTART")
attr(test_datetime, "tzone") <- "Europe/London"
expect_equal(test_datetime,
as.POSIXct("2018-08-09 17:00:00", tz = "Europe/London"))
})


0 comments on commit 30b5b4b

Please # to comment.