with_tz

0th

Percentile

Get date-time in a different time zone...

Get date-time in a different time zone

Keywords
manip, chron
Usage
with_tz(time, tzone="")
Arguments
time
a POSIXct, POSIXlt, Date, or chron date-time object.
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.
Details

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.

Value

  • a POSIXct object in the updated time zone

See Also

force_tz

Aliases
  • with_tz
Examples
x <- as.POSIXct("2009-08-07 00:00:01", tz = "America/New_york")
with_tz(x, "GMT")
# "2009-08-07 04:00:01 GMT"}
Documentation reproduced from package lubridate, version 0.1, License: GPL

Community examples

Looks like there are no examples yet.