get_tzone: Extract the timezone attribute from POSIXct with default on...

Description Usage Arguments Examples

View source: R/fluxnet15_utils.R

Description

Extract the timezone attribute from POSIXct with default on missing

Usage

1
get_tzone(x, default = "GMT")

Arguments

x

POSIXct vector

default

time zone returned, if x has not timezone associated or attribute is the zero string

Examples

1
2
3
4
get_tzone(as.POSIXct("2010-07-01 16:00:00", tz = "etc/GMT-1") )
get_tzone(as.POSIXct("2010-07-01 16:00:00") )
# printed with local time zone, but actually has no tz attribute
get_tzone(Sys.time())

bgctw/etpart documentation built on Dec. 19, 2021, 8:49 a.m.