Convenience helper for examples and user workflows that need UTC timestamps
without repeating as.POSIXct(..., tz = "UTC") boilerplate.
Arguments
- x
A character, Date, or POSIXt vector.
Value
A POSIXct vector in UTC.
Details
Supported inputs are character vectors, Date, and POSIXct/POSIXt.
Character values may be dates ("YYYY-MM-DD"), ISO datetimes with T, ISO
datetimes with trailing Z, or datetimes with a space separator.
Examples
ledgr_utc("2020-01-01")
#> [1] "2020-01-01 UTC"
ledgr_utc("2020-01-01 09:30:00")
#> [1] "2020-01-01 09:30:00 UTC"