nwislocal2utc_offset_seconds: Convert a NWIS Local Time Zone to Offset in Seconds from UTC

Description Usage Arguments Value Author(s) References See Also Examples

Description

Convert a U.S. Geological Survey National Water Information System (NWIS) (U.S. Geological Survey, 2019) time-zone code to the offset in seconds from Coordinated Universal Time (UTC). The NWIS time-zone codes can be found at NWIS Time Zones (accessed on October 22, 2019) and see file ./inst/doc/README.md in the utc2nwislocal sources for more details.

Usage

1

Arguments

tz

A vector of NWIS time-zone codes (such as lev_tz_cd), and NA values are assumed to be in UTC with offset of zero;

Value

The UTC offsets in seconds. Any time zone that does not exist in the lookup table (the hidden environment [hash table] .NWIStzUTC$TimeZone_Offset_seconds), is set to NA (see Examples).

Author(s)

W.H. Asquith

References

U.S. Geological Survey, 2019, USGS water data for the Nation: U.S. Geological Survey National Water Information System database, accessed August 9, 2019, at https://doi.org/10.5066/F7P55KJN.

See Also

utc2nwislocal, nwislocal2utc_offset_hours

Examples

1
2
3
4
5
nwislocal2utc_offset_seconds(c("PST","PDT","the author",NA,"CDT"))
# Results, in seconds, are: [1] -28800 -25200     NA      0 -18000

# Force inspection of lookup table contents, using triple colon notation:
ls(utc2nwislocal:::.NWIStzUTC$TimeZone_Offset_seconds) # keys are time-zone codes

wasquith-usgs/utc2nwislocal documentation built on Oct. 24, 2020, 4:29 p.m.