R/getting.timestamp.R

Defines functions getting.timestamp

Documented in getting.timestamp

#' @title   getting.timestamp
#' @description  This function convert a datetime from timezone
#' America/Sao_Paulo and converts to timezone GMT. This function
#' also add minutes...
#' @param datetime a string containing date and time, ex.:
#' "2020-12-31 10:30".
#' @param min a integer to add minutes a timestamp.
#' @importFrom  lubridate with_tz ymd_hm minutes
#' @export
#'

getting.timestamp <- function(datetime,min){
  return(as.integer(with_tz(ymd_hm(datime, tzone = "America/Sao_Paulo"),tzone = "GMT") + minutes(min)))
}
professor-trade-br/catalogacao documentation built on June 15, 2020, 12:40 a.m.