Fix handling of leadtimes in systems where the time stamp belongs to the following month

2 jobs for dev-loading-system_dates
in 4 minutes and 49 seconds, using 0 compute credits, and was queued for 2 seconds