as-zoned-time-posixt: Convert to a zoned-time from a date-time

as-zoned-time-posixtR Documentation

Convert to a zoned-time from a date-time

Description

This is a POSIXct/POSIXlt method for the as_zoned_time() generic.

Converting from one of R's native date-time classes (POSIXct or POSIXlt) will retain the time zone of that object. There is no zone argument.

Usage

## S3 method for class 'POSIXt'
as_zoned_time(x, ...)

Arguments

x

⁠[POSIXct / POSIXlt]⁠

A date-time.

...

These dots are for future extensions and must be empty.

Value

A zoned-time.

Examples

x <- as.POSIXct("2019-01-01", tz = "America/New_York")
as_zoned_time(x)

clock documentation built on Sept. 11, 2024, 8:39 p.m.