Function iso8601::time

source ·
pub fn time(string: &str) -> Result<Time, String>
Expand description

Parses a time string.

A string can have one of the following formats:

  • 07:35:[00][.123] or 0735[00][.123]
  • 07:35:[00][.123][(Z|(+|-)00:00)]
  • 0735[00][.123][(Z|(+|-)00:00)]
  • 0735[00][.123][(Z|(+|-)0000)]

§Example

let time = iso8601::time("21:56:42").unwrap();