Get the present time, in a stated timezone

presentTime(tz = "UTC")

Arguments

tz

String indicating the desired timezone. The default is to use UTC, which is used very commonly in oceanographic work. To get the local time, use tz="" or tz=NULL,

Value

A POSIXct()-style object holding the present time, in the indicated timezone.

Examples

presentTime() # UTC
#> [1] "2020-07-21 16:51:50 UTC"
presentTime("") # the local timezone
#> [1] "2020-07-21 13:51:50 ADT"