isodt_to_local: Parse an ISO8601 datetime string to a timezone aware...

View source: R/isodt_to_local.R

isodt_to_localR Documentation

Parse an ISO8601 datetime string to a timezone aware datetime.

Description

[Stable]

Usage

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.

Details

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

Value

A lubridate PosixCT datetime in the given timezone.

See Also

Other utilities: attachment_get(), attachment_link(), attachment_url(), drop_null_coords(), form_schema_parse(), get_one_attachment(), get_one_submission(), get_one_submission_attachment_list(), get_one_submission_audit(), handle_ru_attachments(), handle_ru_datetimes(), handle_ru_geopoints(), handle_ru_geoshapes(), handle_ru_geotraces(), odata_submission_rectangle(), predict_ruodk_name(), prepend_uuid(), split_geopoint(), split_geoshape(), split_geotrace(), strip_uuid(), tidyeval, unnest_all()


dbca-wa/ruODK documentation built on March 20, 2024, 12:19 p.m.