Use floor() not rint() when reducing precision of fractional seconds in