Skip to content

Commit

Permalink
Merge pull request #36 from tpgillam/tg/timezone_build
Browse files Browse the repository at this point in the history
Support newer TimeZones version
  • Loading branch information
tpgillam authored Sep 3, 2023
2 parents 0d9b13d + 7f33c1a commit 9dd5f45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "TimeZoneFinder"
uuid = "3ccf6684-3f25-4581-8c58-114637dcab4a"
authors = ["Tom Gillam <tpgillam@googlemail.com>"]
version = "0.4.0"
version = "0.5.0"

[deps]
JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
Expand All @@ -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.10"
julia = "1.6"

[extras]
Expand Down
5 changes: 3 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

2 comments on commit 9dd5f45

@tpgillam
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/90727

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.0 -m "<description of version>" 9dd5f4506277c8fc2a88d2a4284fe3c385efa3b2
git push origin v0.5.0

Please sign in to comment.