Question: I am working specifically with Opportunities, but I assume that all closeDates are stored the same in SF. 

If an Opportunity is closed at 10pm EST, March 4th; the time is 3am March 5th in UTC. Does Salesforce store the closed date as 2014-03-04 or 2014-03-05? And what timezone is that date for?

If your brain hurts, mine does too. I'm ready for [Stardate](http://en.wikipedia.org/wiki/Stardate).

![timezone example](https://i.stack.imgur.com/fed3O.png)

Image from: <http://www.worldtimebuddy.com/utc-to-est-converter>

Answer: 
You can do this in the action method you are using to move to the next page:

```
public PageReference next() {
    if (quo.size() <= 1000) {
        return Page.TheNextPage;
    } else {
        Apexpages.addMessage(new ApexPages.Message(ApexPages.Severity.Info,'Refine search Records should be less than 1000'));
        return null; // Stay on same page
    }
}

```

If you are still hitting the error then you could use [limit](http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_select_limit.htm) to restrict the search results to 1000 and then display a message to let the user know that this has happened. 

```
[select Id from Quote limit:1000];

```
Governor limits cannot be handled on Apex code and Visualforce page like other exceptions.

In you scenario you can check collection size in Apex controller and show error on visualforce page

In Code

```
List<Account> accToAddInSelectOption = [SELECT id FROM Account];
if(accToAddInSelectOption.size()>=1000)
{
  Apexpages.addmessage(new Apexpages.Message(ApexPages.Severity.Info,'Total Number of Records Exceed:' + accToAddInSelectOption.size());
}

```

In page add following Apex tag:

```
<apex:form >
        <apex:messages/>
</apex:form>

```