Skip to content

Commit d2fdec9

Browse files
committed
use ShortString for VariableTimeZone name
1 parent 7ba4d85 commit d2fdec9

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Unicode = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
1818
EzXML = "0.9.1, 1"
1919
Mocking = "0.7"
2020
RecipesBase = "0.7, 0.8, 1"
21-
ShortStrings = "0.3.6"
21+
ShortStrings = "0.3.7"
2222
julia = "1"
2323

2424
[extras]

src/TimeZones.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ using Dates
44
using Printf
55
using Serialization
66
using RecipesBase: RecipesBase, @recipe
7-
using ShortStrings: ShortString15
7+
using ShortStrings: ShortString15, ShortString63
88
using Unicode
99

1010
import Dates: TimeZone, UTC

src/types/variabletimezone.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ end
55

66
Base.isless(a::Transition, b::Transition) = isless(a.utc_datetime, b.utc_datetime)
77

8+
# Ideally would always use ShortString63, but it's `hash` is broken on 32-bit systems.
9+
# https://github.com/JuliaString/MurmurHash3.jl/issues/12
10+
const VariableZoneName = Int === Int64 ? ShortString63 : String
11+
812
"""
913
VariableTimeZone
1014
1115
A `TimeZone` with an offset that changes over time.
1216
"""
1317
struct VariableTimeZone <: TimeZone
14-
name::String
18+
name::VariableZoneName
1519
transitions::Vector{Transition}
1620
cutoff::Union{DateTime,Nothing}
1721

0 commit comments

Comments
 (0)