Skip to content

[R] R builds failing with error 'Invalid: Timestamps already have a timezone: 'UTC'. Cannot localize to 'UTC'' #35633

Closed

Description

@thisisnic

Describe the bug, including details regarding any error messages, version, and platform.

Lots of R builds (e.g. here) are failing with the following error:

Invalid: Timestamps already have a timezone: 'UTC'. Cannot localize to 'UTC'.

which comes from this line in the C++ library:

return Status::Invalid("Timestamps already have a timezone: '", timezone,

This happened since we updated the vendored version of the date library, so perhaps could be related to that?

Component(s)

C++

Activity

  1. added this to the 12.0.1 milestone on May 17, 2023
  2. thisisnic commented on May 17, 2023

    @thisisnic
    MemberAuthor

    This fails on the nightly builds, but I can't replicate this when locally, or when running it on PRs (see #3561).

  3. jorisvandenbossche commented on May 17, 2023

    @jorisvandenbossche
    Member

    This happened since we updated the vendored version of the date library, so perhaps could be related to that?

    Was that done in a specific PR? (to understand what changed)

  4. jorisvandenbossche commented on May 17, 2023

    @jorisvandenbossche
    Member

    I see that this is #35612. Now, that was actually passing on main, so it might also have been triggered by #35449 (which is failing with this on main, and was actually also already failing on the PR ..)

  5. thisisnic commented on May 17, 2023

    @thisisnic
    MemberAuthor

    Yep, it was in #35612

  6. jorisvandenbossche commented on May 17, 2023

    @jorisvandenbossche
    Member

    My assumption is that the fix of #35449 caused one of the test dates to become UTC, causing the failure. If that's the case, we will need to fix the test I think

  7. thisisnic commented on May 17, 2023

    @thisisnic
    MemberAuthor

    You're right; it is failing on the CI on that PR, e.g. https://github.com/apache/arrow/actions/runs/4900485911/jobs/8751167526

  8. jorisvandenbossche commented on May 17, 2023

    @jorisvandenbossche
    Member

    Here:

    formats <- c(formats, "%a", "%A", "%b", "%B", "%OS", "%I%p", "%r", "%T%z")

    This adds the format "%T%z", and that will now actually result in a tz-aware timestamp, while before it didn't parse the timezone correctly (that's the fix in #35449).

    And "strptime" dplyr binding ends up calling assume_timezone, which will not work if the timestamp already has a timezone.

  9. changed the title [-][C++] R builds failing with error 'Invalid: Timestamps already have a timezone: 'UTC'. Cannot localize to 'UTC''[/-] [+][R] R builds failing with error 'Invalid: Timestamps already have a timezone: 'UTC'. Cannot localize to 'UTC''[/+] on May 17, 2023
  10. added a commit that references this issue on May 18, 2023
  11. modified the milestones: 12.0.1, 13.0.0 on May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions