diff --git a/docs/src/api-private.md b/docs/src/api-private.md index e84dac9e1..234fb91b0 100644 --- a/docs/src/api-private.md +++ b/docs/src/api-private.md @@ -29,12 +29,18 @@ TimeZones.first_valid TimeZones.last_valid ``` +## TZFile + +```@docs +TZFile.read +TZFile.write +``` + ## Etc. ```@docs TimeZones.UTCOffset TimeZones.@optional -TimeZones.read_tzfile TimeZones.parse_tz_format TimeZones.tryparse_tz_format hash(::ZonedDateTime, ::UInt) diff --git a/src/tzfile/write.jl b/src/tzfile/write.jl index 72ecb2f1f..777a7860a 100644 --- a/src/tzfile/write.jl +++ b/src/tzfile/write.jl @@ -39,6 +39,14 @@ function _combine_designations(abbrs::AbstractVector{<:AbstractString}) return result, indices end +""" + TZFile.write(io::IO, tz::TimeZone; version::Char=TZFile.WRITE_VERSION) + +Writes the time zone to the I/O stream in the +[POSIX tzfile](https://data.iana.org/time-zones/data/tzfile.5.txt) format. +""" +function write end + function write(io::IO, tz::FixedTimeZone; version::Char=WRITE_VERSION) combined_designation, designation_indices = combine_designations([tz.name])