@@ -64,18 +64,16 @@ US/Pacific (UTC-8/UTC-7)
6464"""
6565TimeZone (:: AbstractString , :: Class )
6666
67- TimeZone (str:: AbstractString , args... ) = TimeZone (String (str), args... )
68-
69- function TimeZone (str:: String , mask:: Class = Class (:DEFAULT ))
67+ function TimeZone (str:: AbstractString , mask:: Class = Class (:DEFAULT ))
7068 # Note: If the class `mask` does not match the time zone we'll still load the
7169 # information into the cache to ensure the result is consistent.
72- tz, class = get! (_tz_cache (), String ( str) ) do
73- tz_path = joinpath (TZData. COMPILED_DIR, split (String ( str) , " /" )... )
70+ tz, class = get! (_tz_cache (), str) do
71+ tz_path = joinpath (TZData. COMPILED_DIR, split (str, " /" )... )
7472
7573 if isfile (tz_path)
7674 open (deserialize, tz_path, " r" )
77- elseif occursin (FIXED_TIME_ZONE_REGEX, String ( str) )
78- FixedTimeZone (String ( str) ), Class (:FIXED )
75+ elseif occursin (FIXED_TIME_ZONE_REGEX, str)
76+ FixedTimeZone (str), Class (:FIXED )
7977 elseif ! isdir (TZData. COMPILED_DIR) || isempty (readdir (TZData. COMPILED_DIR))
8078 # Note: Julia 1.0 supresses the build logs which can hide issues in time zone
8179 # compliation which result in no tzdata time zones being available.
@@ -119,7 +117,7 @@ Check whether a string is a valid for constructing a `TimeZone` with the provide
119117"""
120118function istimezone (str:: AbstractString , mask:: Class = Class (:DEFAULT ))
121119 # Start by performing quick FIXED class test
122- if mask & Class (:FIXED ) != Class (:NONE ) && occursin (FIXED_TIME_ZONE_REGEX, String ( str) )
120+ if mask & Class (:FIXED ) != Class (:NONE ) && occursin (FIXED_TIME_ZONE_REGEX, str)
123121 return true
124122 end
125123
0 commit comments