Add general leap year rule and correct utc output formatting to avoid round-off errors.