Learn R Programming

gghourglass (version 0.0.3)

uses_dst: Test if datetime object potentially uses daylight saving time

Description

Function to check if a datetime object potentially uses daylight saving time. It is not the same as lubridate::dst(), which will determine if daylight saving time is set for the requested date.

Usage

uses_dst(x)

Value

Returns a logical value indicating of the time zone used by the datetime object potentially uses daylight saving time.

Arguments

x

A datetime object.

Author

Pepijn de Vries

Examples

Run this code
uses_dst(as.POSIXct("2020-03-29 02:00:00 CET", tz = "CET"))
uses_dst(as.POSIXct("2020-03-29 02:00:00 UTC", tz = "UTC"))

Run the code above in your browser using DataLab