Skip to content

R-devel changes from last week's dev day lead to datetime check bug #1347

Closed

Description

Image for: 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

Image for: Metadata

Metadata

Image for: Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Image for: Issue actions