Skip to contents

Get the Present Time, in a Stated Timezone

Usage

presentTime(tz = "UTC")

Arguments

tz

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

Value

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

Examples

presentTime() # UTC
#> [1] "2025-01-17 14:30:22 UTC"
presentTime("") # the local timezone
#> [1] "2025-01-17 10:30:22 AST"