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

Set datetime time zone if TZID propery present #53

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
switched test time zone to "Pacific/Auckland" as different to local t…
…ime zone
silverfoxdoc committed Apr 29, 2024
commit b1ca05944872ad9703c419887e88e04f654b5fdd
4 changes: 2 additions & 2 deletions inst/extdata/apple_calendar_test.ics
Original file line number Diff line number Diff line change
@@ -23,9 +23,9 @@ END:VTIMEZONE
BEGIN:VEVENT
CREATED:20230320T213321Z
DESCRIPTION:Testing : 00:00\n
DTEND;TZID=Europe/London:20230630T160000
DTEND;TZID=Pacific/Auckland:20230630T160000
DTSTAMP:20230709T221931Z
DTSTART;TZID=Europe/London:20230630T120000
DTSTART;TZID=Pacific/Auckland:20230630T120000
LAST-MODIFIED:20230320T213321Z
LOCATION:London
SEQUENCE:0
4 changes: 2 additions & 2 deletions tests/testthat/test-ic_datetime.R
Original file line number Diff line number Diff line change
@@ -17,6 +17,6 @@ test_that("ic_datetime is NA for empty:", {
test_that("DTSTART & DTEND time zones equal TZID property", {
f <- system.file("extdata", "apple_calendar_test.ics", package = "calendar")
ics_df = ic_read(f)
expect_equal(attributes(ics_df$DTSTART)$tzone, "Europe/London")
expect_equal(attributes(ics_df$DTEND)$tzone, "Europe/London")
expect_equal(attributes(ics_df$DTSTART)$tzone, "Pacific/Auckland") # "Pacific/Auckland" chosen as different to testers local time zone
expect_equal(attributes(ics_df$DTEND)$tzone, "Pacific/Auckland")
})