zoned_time_now()
returns the current time in the corresponding zone
. It
is a wrapper around sys_time_now()
that attaches the time zone.
zoned_time_now(zone)
A zoned-time of the current time.
[character(1)]
A time zone to get the current time for.
The time is returned with a nanosecond precision, but the actual amount of data returned is OS dependent. Usually, information at at least the microsecond level is returned, with some platforms returning nanosecond information.
x <- zoned_time_now("America/New_York")
Run the code above in your browser using DataLab