Last active
April 16, 2022 20:18
-
-
Save jido/1355e1bd720224364fa06937779f201d to your computer and use it in GitHub Desktop.
EST becomes EDT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> library(clock) | |
> x <- as.POSIXct("2020-11-01 00:30:00", "America/New_York") | |
> x <- add_hours(x, 0:2) | |
> x | |
[1] "2020-11-01 00:30:00 EDT" "2020-11-01 01:30:00 EDT" | |
[3] "2020-11-01 01:30:00 EST" | |
> add_years(x, 1) | |
[1] "2021-11-01 00:30:00 EDT" "2021-11-01 01:30:00 EDT" | |
[3] "2021-11-01 01:30:00 EDT" | |
> add_years(x, -1) | |
[1] "2019-11-01 00:30:00 EDT" "2019-11-01 01:30:00 EDT" | |
[3] "2019-11-01 01:30:00 EDT" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment