tz_abbreviation: Get timezone abbreviation

View source: R/timezone.R

tz_abbreviationR Documentation

Get timezone abbreviation

Description

Returns the timezone abbreviation (e.g., "EST", "PDT") for a given datetime in its specified timezone.

Usage

tz_abbreviation(x, tz = tz_name(x))

Arguments

x

A POSIXct datetime object or something coercible to POSIXct. The timezone is extracted from this object.

tz

A character vector of timezones to abbreviate at time point x.

Value

A character vector of timezone abbreviations.

Examples

tz_abbreviation(Sys.time())
tz_abbreviation(as.POSIXct("2024-01-15 12:00:00", tz = "America/New_York"))


mixtime documentation built on Nov. 18, 2026, 5:08 p.m.