Comparing current date/time to current date doesn't work

Comparing current date/time to current date doesn't work

Here's the code:
  1. bool test.datetest()
    {
        start_date = zoho.currentdate;
        end_date = zoho.currentdate;
        current_date_time = zoho.currenttime;
        test = false;
        if (current_date_time >= start_date && current_date_time <= end_date) {
            test = true;
        }
        return test;
    }









I thought this should return true since the current_date_time has a date that is equal to the start_date and end_date, but instead it returns false.  Why doesn't this return true?

If I change the end_date to be one day in the future (zoho.currentdate.addday(1)), then it returns true.  Shouldn't the above code return true?