m3e/timezone

Types

Direction is the direction of a timezone’s offset from UTC

pub type Direction {
  Plus
  Minus
}

Constructors

  • Plus
  • Minus

TimeZone is a time zone

pub opaque type TimeZone

Values

pub const default: TimeZone
pub fn from_string(input: String) -> Result(TimeZone, String)

from_string parses a timezone string into a TimeZone value.

pub fn new(
  direction: Direction,
  time: time.Time,
) -> Result(TimeZone, String)

new creates a TimeZone value from a direction string and a Time value.

pub fn to_string(tz: TimeZone) -> String

to_string converts a TimeZone value to a string representation.

pub fn zulu() -> TimeZone

zulu returns the Zulu timezone (UTC).

Search Document