Time#yday of January 1 is now 1 instead of 0
Also fixing incorrect calculation when there is a time other than 0:00