From 5d3570dcd8ee58b0be02f035b4a52a2bf6fc737c Mon Sep 17 00:00:00 2001 From: Tom Gillam Date: Sun, 3 Sep 2023 11:24:57 +0100 Subject: [PATCH 1/2] Support newer TimeZones version --- Project.toml | 4 ++-- test/runtests.jl | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index 232d5ed..0a498c2 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "TimeZoneFinder" uuid = "3ccf6684-3f25-4581-8c58-114637dcab4a" authors = ["Tom Gillam "] -version = "0.4.0" +version = "0.5.0" [deps] JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1" @@ -20,7 +20,7 @@ Memoize = "0.4" Meshes = "0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29" PrecompileTools = "1" Scratch = "1" -TimeZones = "1.8" +TimeZones = "1.13" julia = "1.6" [extras] diff --git a/test/runtests.jl b/test/runtests.jl index 6e72dda..8f6db3b 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -44,17 +44,18 @@ Run all code in `f` in the context of tzdata `version`. Instead, one should always call `TimeZone` directly. """ function tzdata_context(f::Function, version::AbstractString) + old_version = TimeZones.TZData.tzdata_version() return try withenv("JULIA_TZ_VERSION" => version) do # We need to re-build TimeZones to ensure that we use the correct version. @assert TimeZones.TZData.tzdata_version() == version - TimeZones.build() + TimeZones.build(version) f() end finally # At this point the version should have been re-set. We must re-build the # TimeZones library to use this other version. - TimeZones.build() + TimeZones.build(old_version) end end From 7f33c1aee408c4c1c4aa6e69e9ba764c05bf7296 Mon Sep 17 00:00:00 2001 From: Tom Gillam Date: Sun, 3 Sep 2023 11:31:55 +0100 Subject: [PATCH 2/2] Version 1.10.0 is the minimum at which tests pass --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 0a498c2..307b0fb 100644 --- a/Project.toml +++ b/Project.toml @@ -20,7 +20,7 @@ Memoize = "0.4" Meshes = "0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29" PrecompileTools = "1" Scratch = "1" -TimeZones = "1.13" +TimeZones = "1.10" julia = "1.6" [extras]