Fix a bug where fetching blendcalendar/range with a timestamp as "end_time" would give bad results