OxL Reference

method Cron.in

Binds the expression to a time zone.

Example:

oxl✓ checked in CI
use std.time { Cron }

fn main() io {
  let s = Cron.parse("0 9 * * MON-FRI")!.in(tz"Europe/Moscow")
  print(s.tz.name)
}
Output
Europe/Moscow
pub(api) fn in (tz: Tz) -> Schedule

Complexity. O(1).

Since. 1.0.0-beta

Effects

none declared (pure unless the body says otherwise)

Defined in: std/time/time.oxl:2471

See also