Skip to contents

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)

Arguments

x

A datetime object.

Value

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

Author

Pepijn de Vries

Examples

uses_dst(as.POSIXct("2020-03-29 02:00:00 CET", tz = "CET"))
#> [1] TRUE
uses_dst(as.POSIXct("2020-03-29 02:00:00 UTC", tz = "UTC"))
#> [1] FALSE