dtt_adjust_tz {dttr2}R Documentation

Adjust Time Zone

Description

Adjusts the time zone so that clock (but not the actual) time is altered for a date time vector. Equivalent to lubridate::with_tz().

Usage

dtt_adjust_tz(x, tz = dtt_default_tz(), ...)

## S3 method for class 'POSIXct'
dtt_adjust_tz(x, tz = dtt_default_tz(), ...)

Arguments

x

A POSIXct vector.

tz

A string of the time zone.

...

Unused.

Value

The date time vector with the new time zone and time.

Methods (by class)

See Also

dtt_set_tz()

Other tz: dtt_set_tz(), dtt_sys_tz(), dtt_tz()

Examples

dtt_adjust_tz(as.POSIXct("1970-01-01", tz = "Etc/GMT+8"), tz = "UTC")

[Package dttr2 version 0.5.0 Index]