I wouldn't use Canonical dates for this. Instead I would create reference dates within the intervals. See See Creating Reference Dates for Intervals.
The script could then be
Month(Date) as Month,
EndTime - StartTime as Duration;
Time(If(first_date>Date,Frac(first_date),0)) as StartTime,
Time(If(end_date<DayEnd(Date),Frac(end_date),Frac(DayEnd(Date)))) as EndTime;
Date(DayStart(first_date)+IterNo()-1) as Date
While IterNo()<=1 + DayStart(end_date) - DayStart(first_date);
Then you get a field with the duration within each date, so you can create a bar chart with month as dimension and Sum(Duration) as measure.