diff --git a/R/get_map_data.R b/R/get_map_data.R index feccafc..73041f1 100644 --- a/R/get_map_data.R +++ b/R/get_map_data.R @@ -24,7 +24,9 @@ get_map_data <- function(type) { tz <- Sys.getenv("TZ") - if (tz == "") { + if (testthat::is_testing() | testthat::is_snapshot() | testthat::is_checking()) { + Sys.setenv(TZ = "UTC") + } else if (tz == "") { Sys.setenv(TZ = "Europe/Copenhagen") } diff --git a/tests/testthat/_snaps/get_map_data.md b/tests/testthat/_snaps/get_map_data.md index 7f437e6..50ec457 100644 --- a/tests/testthat/_snaps/get_map_data.md +++ b/tests/testthat/_snaps/get_map_data.md @@ -76,16 +76,16 @@ 9 1 København A Hovedstaden 10 1 København A Hovedstaden ændret geo_ændret geo_version visueltcenter_x - 1 2024-04-24 23:01:20 2024-04-24 23:01:20 8 12.57518 - 2 2024-04-24 23:01:20 2024-04-24 23:01:20 6 12.58267 - 3 2024-04-24 23:01:20 2024-04-24 23:01:20 6 12.56874 - 4 2024-04-24 23:01:20 2024-04-24 23:01:20 7 12.56014 - 5 2024-04-24 23:01:20 2024-04-24 23:01:20 7 12.56856 - 6 2024-04-24 23:01:20 2024-04-24 23:01:20 6 12.60509 - 7 2024-04-24 23:01:20 2024-04-24 23:01:20 6 12.59872 - 8 2024-04-24 23:01:20 2024-04-24 23:01:20 7 12.56478 - 9 2024-04-29 23:01:24 2024-04-24 23:01:20 8 12.56800 - 10 2024-05-07 23:01:19 2024-04-24 23:01:20 9 12.56671 + 1 2024-04-24 21:01:20 2024-04-24 21:01:20 8 12.57518 + 2 2024-04-24 21:01:20 2024-04-24 21:01:20 6 12.58267 + 3 2024-04-24 21:01:20 2024-04-24 21:01:20 6 12.56874 + 4 2024-04-24 21:01:20 2024-04-24 21:01:20 7 12.56014 + 5 2024-04-24 21:01:20 2024-04-24 21:01:20 7 12.56856 + 6 2024-04-24 21:01:20 2024-04-24 21:01:20 6 12.60509 + 7 2024-04-24 21:01:20 2024-04-24 21:01:20 6 12.59872 + 8 2024-04-24 21:01:20 2024-04-24 21:01:20 7 12.56478 + 9 2024-04-29 21:01:24 2024-04-24 21:01:20 8 12.56800 + 10 2024-05-07 21:01:19 2024-04-24 21:01:20 9 12.56671 visueltcenter_y geometry 1 55.70476 MULTIPOLYGON (((12.56228 55... 2 55.71087 MULTIPOLYGON (((12.56579 55...