convert.tz | R Documentation |
Convert one Date-Time from one timezone to another.
Available timezones can be shown using OlsonNames().
convert.tz(x, tz = Sys.timezone())
x |
The date-time in POSIXlt or POSIXct format |
tz |
The timezone |
convert.tz Convert one Date-Time from one timezone to another
A POSIXlt or POSIXct date converted
Marc Girondot marc.girondot@gmail.com
Function with_tz()
from lubridate
package does the same. I keep it here only for compatibility with old scripts.
d <- as.POSIXlt("2010-01-01 17:34:20", tz="UTC")
convert.tz(d, tz="America/Guatemala")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.