dtt_set_tz {dttr2} | R Documentation |
Set Time Zone
Description
Sets the time zone for a date time vector without adjusting the clock time.
Equivalent to lubridate::force_tz()
.
Usage
dtt_set_tz(x, tz = dtt_default_tz(), ...)
## S3 method for class 'POSIXct'
dtt_set_tz(x, tz = dtt_default_tz(), ...)
Arguments
x |
A date/time vector. |
tz |
A string of the new time zone. |
... |
Unused. |
Value
The date time vector with the new time zone.
Methods (by class)
-
dtt_set_tz(POSIXct)
: Set the time zone for a POSIXct vector
See Also
Other tz:
dtt_adjust_tz()
,
dtt_sys_tz()
,
dtt_tz()
Examples
dtt_set_tz(as.POSIXct("1970-01-01", tz = "Etc/GMT+8"), tz = "UTC")
[Package dttr2 version 0.5.0 Index]