View source: R/timezone-utils.r
tz_time_diff | R Documentation |
Returns the difference in local time expressed in hours between two time zones at a given instant in time. The difference due to daylight saving time or Summer and Winter time as well as historical changes in time zones are taken into account.
tz_time_diff(
when = lubridate::now(),
tz.target = lubridate::tz(when),
tz.reference = "UTC"
)
when |
datetime A time instant |
tz.target , tz.reference |
character Two time zones using names recognized by functions from package 'lubridate' |
A numeric
value.
This function is implemented using functions from package 'lubridate'.
For details on the handling of time zones, please, consult the
documentation for Sys.timezone
about system differences in
time zone names and handling.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.