I need to be able to round time to the next nearest 5 minutes.
Time now 11:54 - clock is 11:55
Time now 11:56 - clock is 12:00
It can never round down just always up to the next time.
I am using this code at the moment but this will round down as well
var time = 1000 * 60 * 5;
var date = new Date();
var rounded = new Date(Math.round(date.getTime() / time) * time);