[][src]Module sunrise_libtimezone::conversion

Conversion module

This module is in charge of converting a Tzif file content to a TimeZoneRule.

Structs

ConversionBuffer

Represent a buffer used to convert a TzIf file to a TimeZoneRule struct.

Rule

Represent a rule of a POSIX TimeZone name.

TzifHeader

Represent the header of a Tzif file.

Enums

RuleType

Represent a rule type of a POSIX TimeZone name.

Constants

GMT_TZ_STRING

GMT POSIX Time Zone abreviation.

TZ_DEFAULT_RULE

Default POSIX Time Zone rules.

Functions

detzcode

Convert a Tzif 32 bits integer to a platform dependent 32 bits integer.

detzcode64

Convert a Tzif 64 bits integer to a platform dependent 64 bits integer.

differ_by_repeat

Return true if t1 - t0 equals to the count of seconds before leap seconds repeat.

get_num

Parse a number and return the rest if the number is in range.

get_offset

Parse the offset of a rule and return the rest if valid.

get_qz_name

Get as shrinked slice at the given delimiter.

get_rule

Parse the given rule and return the rest if valid.

get_secs

Parse a time and return the rest while giving the seconds of the given time.

get_tz_name

Get the timezone name from a given slice.

load_body

Load the given timezones rules from a given ConversionBuffer containing TzIf2 data into the given TimeZoneRule.

parse_timezone_name

Parse a POSIX timezone c string into a TimeZoneRule.

translate_rule_to_time

Translate a given rule to a Time.

tzif_header_from_bytes

Convert a slice to a ref to a TzifHeader with the appropriate lifetime.