Should be using floor rather than rounding, with rounding it would pull from the wrong timestamp for the last 30 seconds of every minute.