GMT.offset.from.tz {oce}R Documentation

Determine time offset from timezone

Description

Determine time offset from timezone

Usage

GMT.offset.from.tz(tz)

Arguments

tz a timezone, e.g. UTC.

Details

The data are from http://www.timeanddate.com/library/abbreviations/timezones/ and were hand-edited to develop this code, so there may be errors. Also, note that some of these contradict; if you examine the code, you'll see some commented-out portions that represent solving conflicting definitions by choosing the more common timezone abbreviation over a the less common one.

Value

Number of hours in offset, e.g. AST yields 4.

Author(s)

Dan Kelley

Examples

library(oce)
cat("Atlantic Standard Time is ", GMT.offset.from.tz("AST"), "hours after UTC")

[Package oce version 0.1-80 Index]