powered by
midnightStandard2() relies on strptime wherever possible, and there simply returns as.POSIXct(strptime(charvec, format, tz = "GMT")).
midnightStandard2()
strptime
as.POSIXct(strptime(charvec, format, tz = "GMT"))
midnightStandard (charvec, format) midnightStandard2(charvec, format)
midnightStandard
character
midnightStandard2
POSIXct
ch <- "2007-12-31 24:00" midnightStandard(ch) (ms2 <- midnightStandard2(ch)) class(ms2)
Run the code above in your browser using DataLab