Bug fixes to the date/time shift functions