Created
June 30, 2019 12:14
-
-
Save ajdamico/e8df68585b54be4d1a1e3a5c52e596c3 to your computer and use it in GitHub Desktop.
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(lubridate) | |
x <- ymd_h( "1999-12-31:23" ) | |
y <- ymd_h( "2000-01-02:01" ) | |
# https://en.wikipedia.org/wiki/UTC%E2%88%9212:00 | |
( x1 <- force_tzs( x , tzone="Etc/GMT+12" , tzone_out="UTC" ) ) | |
# https://en.wikipedia.org/wiki/UTC%2B14:00 | |
( y1 <- force_tzs( y , tzone="Pacific/Kiritimati" , tzone_out="UTC" ) ) | |
difftime( x1 , y1 ) | |
# Time difference of 0 secs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment