How convert decimal to POSIX time

@Arun’s strategy works, but it might be easier to just do:

x <- c(6.49055593325792, 18.2873900837081)
today<-as.POSIXct('2012-01-23 00:00:00 EST')
today + (3600*x)

# "2012-01-23 06:29:26 EST" "2012-01-23 18:17:14 EST"

That will get you the seconds as well.

Leave a Comment