tz_transitions: Get timezone transitions

View source: R/timezone.R

tz_transitionsR Documentation

Get timezone transitions

Description

Returns all timezone transitions (e.g., daylight saving time changes) that occur between two datetimes. The timezone is taken from the start datetime.

Usage

tz_transitions(start, end)

Arguments

start

A POSIXct datetime object or something coercible to POSIXct, representing the start of the time range. The timezone is extracted from this object.

end

A POSIXct datetime object or something coercible to POSIXct, representing the end of the time range.

Value

A data frame with columns:

  • time: A mixtime linear time point (continuous, UTC seconds) giving the instant of the transition.

  • offset_before, offset_after: mixtime durations (UTC seconds) giving the UTC offset immediately before and after the transition.

Examples

# Get all DST transitions in 2024 for New York
tz_transitions(
  as.POSIXct("2024-01-01", tz = "America/New_York"),
  as.POSIXct("2024-12-31", tz = "America/New_York")
)


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