Fix a number of DST and leap year issus due to time interval usage for date offset calculations.