R/utils.R

Defines functions convert_backward_tzdata int32_to_uint32

int32_to_uint32 <- function(int32) {

  ifelse(int32 >= 0, int32, 2^31 - 1 + int32)

}

convert_backward_tzdata <- function(tz) {

  # Convert timezones removed in tzdata 2024b.
  # This is a subset of what tzdata-backward is providing, based on cases we
  # could observe in test files. It can be expanded based on user feedback and
  # new test files.
  switch(
    tz,
    EST = "America/Panama",
    CET = "Europe/Brussels",
    tz
  )

}
Bisaloo/lightr documentation built on Feb. 6, 2025, 11:56 a.m.