local2UTC: local2UTC

Description Usage Arguments Examples

Description

Converts local (solar) time to UTC based on simple longitude correction. So far, this conversion does not take into account the varying length of solar days throughout the year.

Usage

1
local2UTC(x, longitude = 0)

Arguments

x

a datum (local time) of class POSIXct to be converted

longitude

longitude of the location in degree at which local time is supplied. If no longitude is supplied the same datum should be returned.

Examples

1
2
3
4
5
6
7
8
9
dd <- as.POSIXct('1815-01-01 12:00:01', tz='UTC')
local2UTC(dd)

# not setting the time zone to UTC throws a warning
local2UTC(as.POSIXct('1815-01-01 12:00:01'))

## noon at the date line is midnight in England
local2UTC(dd, 180)
local2UTC(dd, -180)

jonasbhend/pressurehelper documentation built on May 19, 2019, 7:27 p.m.