This function uses two packages, RCurl
and XML
, that are not
required for the streamMetabolizer
package as a whole. If these are
not already installed, run install.packages(c('RCurl','XML'))
before
calling lookup_google_timezone
.
Usage
lookup_google_timezone(
latitude,
longitude,
timestamp = if (unitted::v(latitude) >= 0) as.POSIXct("2015-01-01 00:00:00", tz =
"UTC") else as.POSIXct("2015-07-01 00:00:00", tz = "UTC")
)
Arguments
- latitude
degrees latitude (positive for north) of the location to look up.
- longitude
degrees longitude (positive for east) of the location to look up.
- timestamp
POSIXct representation of a time - determines daylight savings offset, if any. the default is Jan 1 for northern latitudes and July 1 for southern latitudes, i.e., a time surely not during daylight savings time.