Learn R Programming

solartime (version 0.0.4)

setLocalTimeZone: setLocalTimeZone

Description

modify tzone attribute of timestamp to 'GMT+x' for local to given longitude

Usage

setLocalTimeZone(timestamp, longDeg)

Value

timestamp with modified tzone attribute. Its the same time point expressed in another time zone. E.g. "2019-04-04 00:00:00 UTC" becomes "2019-04-04 10:00:00 +10" for a longitude of +150 (Sydney, Australia)

Arguments

timestamp

POSIXct

longDeg

Longitude in (decimal) degrees

Author

Thomas Wutzler