Updates the [Clock] node in an APSIM Next Generation model to set the
simulation start and end timestamps. Supporting evidence is stored under
attr(x, "agrillm")$clock.
apply_clock(apsimx, start = "1976-01-01T00:00:00", end = "2025-12-31T00:00:00")APSIM model object as returned by rapsimng::read_apsimx().
Character scalar start timestamp in YYYY-mm-ddTHH:MM:SS
format.
Character scalar end timestamp in YYYY-mm-ddTHH:MM:SS format.
A modified APSIM model object with updated clock settings.
if (FALSE) { # \dontrun{
apsimx_path <- system.file("examples", "wheat.apsimx", package = "agrillm")
apsimx <- rapsimng::read_apsimx(apsimx_path)
updated <- apply_clock(apsimx, start = "2012-01-01T00:00:00", end = "2013-12-31T00:00:00")
attr(updated, "agrillm")$clock
} # }