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] "2024-04-24 22:17:04 UTC"
presentTime("") # the local timezone
#> [1] "2024-04-24 19:17:04 ADT"