Skip to content

waterDayYear() needs fixing (again) for locale  #268

Closed
@brownag

Description

waterDayYear() failing again (#223, #237) on CRAN for several R-devel architectures.

This may not be specifically related to R-devel changes, as our regular tests pass on GHA, but rather likely related to the locale the tests are being run in combined with recent R-devel changes to date/time related functions

  ── Failure (test-waterDayYear.R:15:3): works as expected ───────────────────────
  res.lr$wd not equal to 153L.
  1/1 mismatches
  [1] 152 - 153 == -1
  ── Failure (test-waterDayYear.R:16:3): works as expected ───────────────────────
  res$wd not equal to 152L.
  1/1 mismatches
  [1] 151 - 152 == -1
  ── Failure (test-waterDayYear.R:23:3): works as expected ───────────────────────
  res$wd not equal to 1.
  1/1 mismatches
  [1] 0 - 1 == -1
  ── Failure (test-waterDayYear.R:30:3): works as expected ───────────────────────
  res$wd not equal to 365.
  1/1 mismatches
  [1] 364 - 365 == -1
  ── Failure (test-waterDayYear.R:38:3): works as expected ───────────────────────
  res$wd not equal to c(50, 140).
  2/2 mismatches (average diff: 1)
  [1] 49 - 50 == -1
  [2] 139 - 140 == -1

R-devel related changes:

  • The as.POSIXlt(<POSIXlt>) and as.POSIXct(<POSIXct>) default methods now do obey their tz argument, also in this case.

  • as.POSIXlt(<Date>) now does apply a tz (timezone) argument, as does as.POSIXct(); partly suggested by Roland Fuß on the R-devel mailing list.

  • as.Date.POSIXct(., tz) now treats several ‘tz’ values, notably ‘"GMT"’ as equivalent to ‘"UTC"’, proposed and improved by Michael Chirico and Joshua Ulrich in PR#17674.

  • as.POSIXct(<numeric>) and as.POSIXlt(.) (without specifying ‘origin’) now work. So does as.Date(<numeric>), too.

  • As ‘"POSIXlt"’ objects may be “partially filled” and their list components meant to be recycled, ‘length()’ now is the length of the longest component.

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