calc_single_datetime: Convert UTC to local time for a single observation
Description
This function calculated the local date-time for an observation based on a
date-time in Coordinated Universal Time (UTC). The function provides a
wrapper for the with_tz function form the lubridate package.
It converts output from the with_tz function to a character vector
so other functions in this package can be applied without error to
with a dataframe with observations from multiple time zones to local time.
Usage
calc_single_datetime(datetime, tz)
Arguments
datetime
A POSIXct object of length one expressed in Coordinated
Universal Time (UTC)
tz
A character string giving the local time zone based on the
Olson/IANA time zone names
Value
A character string giving the date-time in the local time zone