-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck_tz.Rd
26 lines (25 loc) · 985 Bytes
/
check_tz.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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{check_tz}
\alias{check_tz}
\title{Check the time zone of an object and force UTC if absent}
\source{
This function is taken from the `utils.add' package (https://github.com/edwardlavender/utils.add). It is defined separately in \code{\link[flapper]{flapper}} to reduce reliance on non-default packages.
}
\usage{
check_tz(arg = deparse(substitute(input)), input)
}
\arguments{
\item{arg}{(optional) A character string which defines the argument of the parent function.}
\item{input}{An object.}
}
\value{
An object as inputted in which, if the object is of class Date or POSIXct and a time zone is absent, time zone "UTC" is forced.
}
\description{
This function checks the time zone of an inputted object. If the object is of class Date or POSIXct and a time zone is absent, then "UTC" is forced. Otherwise, the object is returned unchanged.
}
\author{
Edward Lavender
}
\keyword{internal}