Skip to contents

Formats a time as an RFC 3339 / ISO 8601 timestamp in UTC (e.g. "2026-09-06T21:15:30Z"), the interchange format expected in machine-readable API responses.

Named ts_utc() (rather than ts()) to avoid masking stats::ts().

Usage

ts_utc(time = Sys.time())

Arguments

time

A POSIXct time. Defaults to Sys.time().

Value

A character string containing the formatted timestamp.

Examples

ts_utc()
#> [1] "2026-09-07T03:55:00Z"