Esempio n. 1
0
        public static DateTime GetRptDate_1Hour(DateTime t, int baseMinute)
        {
            // 1H为单位
            //1시간 단위
            int baseHours = 1;

            //ex) HH:30:00
            DateTime rptDate = LcdHelper.Trim(t, "HH").AddMinutes(baseMinute);

            //超过baseMinute(ex.30min)时,后续时间段的baseMinute的Actual
            //baseMinute(ex.30분) 이상인 경우 이후 시간대 baseMinute의 실적
            //07:30 = 06:30(超过) ~ 07:30(以下)时, 06:40 --> 07:30, 07:30 --> 07:30, 07:40 --> 08:30
            //07:30 = 06:30(초과) ~ 07:30(이하)인경우, 06:40 --> 07:30, 07:30 --> 07:30, 07:40 --> 08:30
            if (t.Minute > baseMinute)
            {
                rptDate = rptDate.AddHours(baseHours);
            }

            return(rptDate);
        }