-
Notifications
You must be signed in to change notification settings - Fork 12
/
isodt_to_local.Rd
70 lines (65 loc) · 2.25 KB
/
isodt_to_local.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/isodt_to_local.R
\name{isodt_to_local}
\alias{isodt_to_local}
\title{Parse an ISO8601 datetime string to a timezone aware datetime.}
\usage{
isodt_to_local(
datetime_string,
orders = c("YmdHMS", "YmdHMSz"),
tz = get_default_tz(),
quiet = TRUE
)
}
\arguments{
\item{datetime_string}{(character) An ISO8601 datetime string as produced by
XForms exported from ODK Central.}
\item{orders}{(vector of character) Orders of datetime elements for
\code{lubridate}.
Default: \code{c("YmdHMS", "YmdHMSz", "Ymd HMS", "Ymd HMSz")}.}
\item{tz}{A timezone to convert dates and times to.
Read \code{vignette("setup", package = "ruODK")} to learn how \code{ruODK}'s
timezone can be set globally or per function.}
\item{quiet}{(lgl) Used in \code{lubridate::parse_date_time(quiet=quiet)} to
suppress warnings from attempting to parse all empty values or columns.
Run with \code{quiet=FALSE} to show any \code{lubridate} warnings.}
}
\value{
A \code{lubridate} PosixCT datetime in the given timezone.
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}}
}
\details{
This function is used internally by \code{ruODK} to parse ISO timestamps
to timezone-aware local times.
Warnings are suppressed through \code{lubridate::parse_date_time(quiet=TRUE)}.
}
\seealso{
Other utilities:
\code{\link{attachment_get}()},
\code{\link{attachment_link}()},
\code{\link{attachment_url}()},
\code{\link{drop_null_coords}()},
\code{\link{form_schema_parse}()},
\code{\link{get_one_attachment}()},
\code{\link{get_one_submission}()},
\code{\link{get_one_submission_att_list}()},
\code{\link{get_one_submission_audit}()},
\code{\link{handle_ru_attachments}()},
\code{\link{handle_ru_datetimes}()},
\code{\link{handle_ru_geopoints}()},
\code{\link{handle_ru_geoshapes}()},
\code{\link{handle_ru_geotraces}()},
\code{\link{odata_submission_rectangle}()},
\code{\link{predict_ruodk_name}()},
\code{\link{prepend_uuid}()},
\code{\link{split_geopoint}()},
\code{\link{split_geoshape}()},
\code{\link{split_geotrace}()},
\code{\link{strip_uuid}()},
\code{\link{tidyeval}},
\code{\link{unnest_all}()}
}
\concept{utilities}
\keyword{internal}