R/time.R

Defines functions unix_time

# Returns a date value, given the number of seconds since Jan 1, 1970.
unix_time <- function(sec, nsec = 0) {
  # origin: 1970-01-01 00:00:00
  return(.POSIXct(as.numeric(sec), tz = "GMT"))
}

Try the paws.common package in your browser

Any scripts or data that you put into this service are public.

paws.common documentation built on Oct. 4, 2024, 1:08 a.m.