compute_bin: fix origin handling for dates and times