Skip to content

Commit

Permalink
Fixed new test 1779.9 to pass 4.5 year old R 3.0.0. Tested R 3.0.0 to…
Browse files Browse the repository at this point in the history
… check removal of Rversion.h for #2456 was ok.
  • Loading branch information
mattdowle committed Nov 6, 2017
1 parent 47b1bbd commit ce37655
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion inst/tests/tests.Rraw
Original file line number Diff line number Diff line change
Expand Up @@ -10756,7 +10756,12 @@ test(1779.6, identical(as.IDate.default(p), as.IDate(p)))
p = as.POSIXct(i, origin = "1970-01-01", tz = "America/New_York")
test(1779.7, identical(as.ITime.default(p), as.ITime(p)))
test(1779.8, identical(as.IDate.default(p), as.IDate(p)))
p = as.POSIXct(i, origin = "1970-01-01")

# R 3.0.1 had the following bug fix in R News :
# " as.POSIXct.numeric was coercing origin using the tz argument and not "GMT" as documented (PR#14973) "
# So tz="UTC" is required on next line for test 1779.9 to pass R 3.0.0 (current stated dependency).
# Test 1779.9 would be fine without the tz="UTC" from R 3.0.1 onwards.
p = as.POSIXct(i, origin = "1970-01-01", tz="UTC")
test(1779.9, identical(as.ITime.default(p), as.ITime(p)))
test(1779.11, identical(as.IDate.default(p), as.IDate(p)))
test(1779.12, as.IDate("20170929", "%Y%m%d"), as.IDate("20170929", format="%Y%m%d")) # 2453
Expand Down

0 comments on commit ce37655

Please sign in to comment.