Index: src/core/src/test/org/apache/lucene/gdata/utils/TestDateFormater.java
===================================================================
--- src/core/src/test/org/apache/lucene/gdata/utils/TestDateFormater.java	(revision 578238)
+++ src/core/src/test/org/apache/lucene/gdata/utils/TestDateFormater.java	(working copy)
@@ -1,12 +1,12 @@
-/** 
+/**
  * Copyright 2004 The Apache Software Foundation 
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License"); 
  * you may not use this file except in compliance with the License. 
  * You may obtain a copy of the License at 
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0 
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software 
  * distributed under the License is distributed on an "AS IS" BASIS, 
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
@@ -15,46 +15,49 @@
  */
 package org.apache.lucene.gdata.utils;
 
+import junit.framework.TestCase;
+
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
-import junit.framework.TestCase;
-
 public class TestDateFormater extends TestCase {
 
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
+  protected void setUp() throws Exception {
+    super.setUp();
+  }
 
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-    /*
-     * Test method for 'org.apache.lucene.gdata.utils.DateFormater.formatDate(Date, String)'
-     */
-    public void testFormatDate() throws ParseException {
-        // this reg. --> bit weak but does the job
-            java.util.regex.Pattern pattern =  java.util.regex.Pattern.compile("[A-Z][a-z]{1,2}, [0-9]{1,2} [A-Z][a-z]{2} [0-9]{4} [0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2} [A-Z]{2,4}");
-            Date date = new Date();
-            String formatedDate = DateFormater.formatDate(date,DateFormater.HTTP_HEADER_DATE_FORMAT);
-            assertTrue(formatedDate + " does not match expected pattern",
-                       pattern.matcher(formatedDate).matches());
-            DateFormater.parseDate("Sun, 25 Jun 2006 13:51:23 +0000",DateFormater.HTTP_HEADER_DATE_FORMAT,DateFormater.HTTP_HEADER_DATE_FORMAT_TIME_OFFSET);
-            DateFormater.parseDate("Sun, 25 Jun 2006 13:51:23 CEST",DateFormater.HTTP_HEADER_DATE_FORMAT,DateFormater.HTTP_HEADER_DATE_FORMAT_TIME_OFFSET);
-            //TODO extend this
-    }
+  protected void tearDown() throws Exception {
+    super.tearDown();
+  }
+
+  /*
+  * Test method for 'org.apache.lucene.gdata.utils.DateFormater.formatDate(Date, String)'
+  */
+  public void testFormatDate() throws ParseException {
+    // this reg. --> bit weak but does the job
+    // Sun, 23 Sep 2007 01:29:06 GMT+00:00
+    java.util.regex.Pattern pattern = java.util.regex.Pattern.compile("[A-Z][a-z]{1,2}, [0-9]{1,2} [A-Z][a-z]{2} [0-9]{4} [0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2} [A-Z]{2,4}");
+    Date date = new Date();
+    String formatedDate = DateFormater.formatDate(date, DateFormater.HTTP_HEADER_DATE_FORMAT);
+    assertTrue(formatedDate + " does not match expected pattern",
+            pattern.matcher(formatedDate).matches());
+    DateFormater.parseDate("Sun, 25 Jun 2006 13:51:23 +0000", DateFormater.HTTP_HEADER_DATE_FORMAT, DateFormater.HTTP_HEADER_DATE_FORMAT_TIME_OFFSET);
+    DateFormater.parseDate("Sun, 25 Jun 2006 13:51:23 CEST", DateFormater.HTTP_HEADER_DATE_FORMAT, DateFormater.HTTP_HEADER_DATE_FORMAT_TIME_OFFSET);
     
-    public void testFormatDateStack(){
-        DateFormater formater = new DateFormater();
-        SimpleDateFormat f1 = formater.getFormater();
-        SimpleDateFormat f2 = formater.getFormater();
-        assertNotSame(f1,f2);
-        formater.returnFomater(f1);
-        assertSame(f1,formater.getFormater());
-        formater.returnFomater(f2);
-        assertSame(f2,formater.getFormater());
-        
-    }
-    
+    //TODO extend this
+  }
+
+  public void testFormatDateStack() {
+    DateFormater formater = new DateFormater();
+    SimpleDateFormat f1 = formater.getFormater();
+    SimpleDateFormat f2 = formater.getFormater();
+    assertNotSame(f1, f2);
+    formater.returnFomater(f1);
+    assertSame(f1, formater.getFormater());
+    formater.returnFomater(f2);
+    assertSame(f2, formater.getFormater());
+
+  }
+
 }
Index: src/core/src/java/org/apache/lucene/gdata/utils/DateFormater.java
===================================================================
--- src/core/src/java/org/apache/lucene/gdata/utils/DateFormater.java	(revision 578238)
+++ src/core/src/java/org/apache/lucene/gdata/utils/DateFormater.java	(working copy)
@@ -22,6 +22,7 @@
 import java.util.Date;
 import java.util.Locale;
 import java.util.Stack;
+import java.util.TimeZone;
 
 /**
  * This class uses the {@link java.text.SimpleDateFormat} class to format dates
@@ -123,9 +124,12 @@
     }
 
     protected SimpleDateFormat getFormater() {
-        if (this.objectStack.empty())
-            return new SimpleDateFormat(DateFormater.HTTP_HEADER_DATE_FORMAT,Locale.ENGLISH);
-        return this.objectStack.pop();
+        if (this.objectStack.empty()) {
+          SimpleDateFormat dateFormat = new SimpleDateFormat(DateFormater.HTTP_HEADER_DATE_FORMAT, Locale.ENGLISH);
+          dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
+          return dateFormat;
+        }
+      return this.objectStack.pop();
     
     }
 
