baml.time.system_timezone

The system's IANA timezone identifier, for example `"America/Los_Angeles"`. Mirrors `Temporal.Now.timeZoneId()`.

Reference version

Signature

function baml.time.system_timezone() -> string throws baml.errors.Io

The system's IANA timezone identifier, for example "America/Los_Angeles". Mirrors Temporal.Now.timeZoneId().

An IO function, so hosts can swap the system-state source out.

Throws

  • baml.errors.Io if the host has a timezone database but cannot tell which zone it is configured for — an unset or unrecognized system setting, which a caller can reasonably fall back from (say, to UTC).

Panics

  • baml.panics.HostUnavailable if the host provides no timezone database at all. Nothing the caller could have done differently, so it takes the panic channel rather than the error one.

Source:<builtin>/baml/ns_time/timezone.bamlbytes 85648648