ice_cube
ice_cube copied to clipboard
Duration for overnight events
I don't know if it is for a specific purpose or simply a bug, but just in case of let me share what I am curious about:
Inside the Occurence class, duration method is defined as follows:
def duration
end_time - start_time
end
However, in the case of an overnight event, this would return a negative value.
Since it is a common case, I was thinking that this was maybe for a specific purpose I am not aware of ?
start_time and end_time must be 'datetime' format on the database