Fix to handle time as both datetime and ints