inst/tinytest/hide/test_gh_issues_36_51.R

library(anytime)

oldtz <- anytime:::getTZ()
anytime:::setTZ("Europe/London")

if (anytime:::getTZ() != "Europe/London") {
    cat("Note that you MUST use Europe/London to see anything here\n")
}

start <- anytime("1971-10-31 00:00:00")
for (i in 0:25) {
    now <- start + i*60*60
    txt <- iso8601(now)
    res <- iso8601(anytime(txt))
    #cat("Using ", now, " == ", txt, " parsed as ", res, "\n")
}

Try the anytime package in your browser

Any scripts or data that you put into this service are public.

anytime documentation built on Aug. 28, 2020, 1:12 a.m.