[Stable]

isodt_to_local(
  datetime_string,
  orders = c("YmdHMS", "YmdHMSz"),
  tz = get_default_tz()
)

Arguments

datetime_string

(character) An ISO8601 datetime string as produced by XForms exported from ODK Central.

orders

(vector of character) Orders of datetime elements for lubridate. Default: c("YmdHMS", "YmdHMSz", "Ymd HMS", "Ymd HMSz").

tz

A timezone to convert dates and times to.

Read vignette("setup", package = "ruODK") to learn how ruODK's timezone can be set globally or per function.

Value

A lubridate PosixCT datetime in the given timezone.

Details

This function is used internally by ruODK to parse ISO timestamps to timezone-aware local times.

See also