In a small saucepan, combine the sugar, vinegars, and spices and heat over medium-high heat until the sugar has dissolved. Pour over the top of the sliced cucumbers and onions and allow the bowl to come to room temperature before placing in the refrigerator for 24 hours.