Sorry, too hasty the first time!  Always double check!

round <- function(timestamp)
{
time <- as.seconds(timestamp)
remainder <- time % 300
if(remainder >= 150) time <- time + (300 - time % 300)
*** else time <- time - time % 300)
return as.timestamp(time)
}

Cheers,
-David

	[[alternative HTML version deleted]]

