Skip to main content

Text.parse_time_zone

parse_time_zone

Group: Conversions
Aliases: time_zone from text, to_time_zone

Documentation

This method parses the ID producing a Time_Zone.

Examples

Get Central European Time.

      import Standard.Base.Data.Text.Extensions

example_parse = "CET".parse_time_zone

Get Moscow time.

      import Standard.Base.Data.Text.Extensions

example_parse = "Europe/Moscow".parse_time_zone

Get time zone -06:00.

      import Standard.Base.Data.Text.Extensions

example_parse = "-06:00".parse_time_zone

Get custom offset +03:02:01 of 3 hours 2 minutes an 1 second.

      import Standard.Base.Data.Text.Extensions

example_parse = "+03:02:01".parse_time_zone