Initialize day of year value.

There are cases where the day of year value in struct tm is used, but it never
got calculated. Problem found by Coverity scan.