% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/time-zones.r
\name{with_tz}
\alias{with_tz}
\alias{with_tz.default}
\title{Get date-time in a different time zone}
\usage{
with_tz(time, tzone = "", ...)

\method{with_tz}{default}(time, tzone = "", ...)
}
\arguments{
\item{time}{a POSIXct, POSIXlt, Date, chron date-time object or a data.frame
object. When a data.frame all POSIXt elements of a data.frame are processed
with \code{with_tz()} and new data.frame is returned.}

\item{tzone}{a character string containing the time zone to convert to. R
must recognize the name contained in the string as a time zone on your
system.}

\item{...}{Parameters passed to other methods.}
}
\value{
a POSIXct object in the updated time zone
}
\description{
with_tz returns a date-time as it would appear in a different time zone.
The actual moment of time measured does not change, just the time zone it is
measured in. with_tz defaults to the Universal Coordinated time zone (UTC)
when an unrecognized time zone is inputted. See \code{\link[=Sys.timezone]{Sys.timezone()}}
for more information on how R recognizes time zones.
}
\examples{
x <- ymd_hms("2009-08-07 00:00:01", tz = "America/New_York")
with_tz(x, "GMT")
}
\seealso{
\code{\link[=force_tz]{force_tz()}}
}
\keyword{chron}
\keyword{manip}
