Description Usage Arguments Examples
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.
1 | local2UTC(x, longitude = 0)
|
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. |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.