Closed
Description
Issue
R Contributors had a Dev Day last week in conjunction with LatinR. @hturner and I worked on an old datetime issue which we got resolved and merged to R-devel thanks to @mmaechler. Now, of course, no small good deed goes unpunished as the buglet just found here reveals that the fix in R-devel may have been suboptimal. I just sent a suggested fix to the Bugzilla bug tracker on that issue which is here.
Suggested Fix
We can work around this by supplying a slightly different fixed format string:
diff --git a/inst/tinytest/test_date.R b/inst/tinytest/test_date.R
index 84891ae5..a24e2668 100644
--- a/inst/tinytest/test_date.R
+++ b/inst/tinytest/test_date.R
@@ -194,7 +194,7 @@ expect_equal(Datetime_format(d,"%Y-%m-%d %H:%M:%S"),
format(d, "%Y-%m-%d %H:%M:%OS"),
info="Datetime.formating.default")
expect_equal(Datetime_format(d, "%Y/%m/%d %H:%M:%S"),
- format(d, "%Y/%m/%d %H:%M:%OS"),
+ format(d, "%Y/%m/%d %H:%M:%OS6"),
info="Datetime.formating.given.format")
expect_equal(Datetime_ostream(d),
format(d, "%Y-%m-%d %H:%M:%OS"),
which avoids the isssue tickled and will do no harm whether my additional change gets accepted or not.
Metadata
Metadata
Assignees
Labels
No labels