convert.tz: Convert one Date-Time from one timezone to another

View source: R/convert.tz.R

convert.tzR Documentation

Convert one Date-Time from one timezone to another

Description

Convert one Date-Time from one timezone to another.
Available timezones can be shown using OlsonNames().

Usage

convert.tz(x, tz = Sys.timezone())

Arguments

x

The date-time in POSIXlt or POSIXct format

tz

The timezone

Details

convert.tz Convert one Date-Time from one timezone to another

Value

A POSIXlt or POSIXct date converted

Author(s)

Marc Girondot marc.girondot@gmail.com

See Also

Function with_tz() from lubridate package does the same. I keep it here only for compatibility with old scripts.

Examples

d <- as.POSIXlt("2010-01-01 17:34:20", tz="UTC")
convert.tz(d, tz="America/Guatemala")

HelpersMG documentation built on Sept. 12, 2024, 9:35 a.m.