GMToffset | R Documentation |
Finds offset in hours from UTC for given time zone.
GMToffset(timezone)
timezone |
Required. A string containing the time zone. Works with designated time zones such as CST and MST for Central Standard or Mountain Standard time or offset time zones such as etc/GMT+6 or etc/GMT+7 for Central Standard and Mountain Standard time. Does NOT work with location time zones like America/Regina. |
Returns the offset in hours as a numeric value.
This code was based on the function GMTOffsetFromTz
in the
package oce, but works for more time zones and returns a negative
value in the western hemisphere.
Kevin Shook
GMToffset('MST')
GMToffset('etc/GMT+6')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.