now_utc {Nmisc}R Documentation

Current time in UTC time zone

Description

Returns a vector with the current date and time in the UTC time zone.

Usage

now_utc(length = 1L)

Arguments

length

Positive integer (scalar) indicating the length of the returned vector. If length is a vector of multiple elements, only the first element is taken into account.

Value

A POSIXct vector of size length with the tzone attribute set to "UTC".

See Also

Sys.time, lubridate::now

Examples

now_utc(0)
# returns "POSIXct of length 0"


[Package Nmisc version 0.3.7 Index]