 
                 assertEquals(1, e.data.length);
 
-                assertEquals(new Date(DateUtil.MIN_DATE_TICKS).time, e.data[0]['neg_inf'].time);
-                assertEquals(new Date(1970, 0, 1).time, e.data[0]['epoch'].time);
-                assertEquals(new Date(DateUtil.MAX_DATE_TICKS).time, e.data[0]['inf'].time);
+                assertDatesEqual(new Date(DateUtil.MIN_DATE_TICKS), e.data[0]['neg_inf']);
+                assertDatesEqual(new Date(1970, 0, 1), e.data[0]['epoch']);
+                assertDatesEqual(new Date(DateUtil.MAX_DATE_TICKS), e.data[0]['inf']);
             };
 
             // TODO: more dates
             var sql:String = "select '-infinity'::timestamptz as neg_inf, '1970-01-01 00:00:00'::timestamptz as epoch, 'infinity'::timestamptz as inf";
             runQuery(sql, verifyFn);
         }
+
+        // TODO: these should be pulled out as more general, but the way asserts work
+        // in flexunit, this is a little tricky
+        private static function assertDatesEqual(expected:Date, actual:Date):void {
+            if (expected == null) {
+                assertNull("Expected null; got " + actual, false);
+            } else {
+                assertEquals("Expected " + expected + "; got " + actual, expected.time, actual.time);
+            }
+        }
+
+        private static function assertWithin(expected:Number, actual:Number, tolerance:Number=1e-10):void {
+            if (isFinite(expected)) {
+                assertTrue("Expected " + expected.toPrecision(20) + " +/-" + tolerance + "; got " + actual.toPrecision(20) +
+                    " (an error of " + Math.abs(expected - actual) + ")", Math.abs(expected - actual) <= tolerance);
+            } else {
+                assertTrue("Expected " + expected.toPrecision(20) + "; got " + actual.toPrecision(20),
+                    !isFinite(actual) && isNaN(expected) == isNaN(actual) && expected > 0 == actual > 0);
+
+            }
+        }
     }
 }

        }

        [Test(async,timeout=1000)]
        public function testSelectDate():void {
            var verifyFn:Function = function(e:QueryResultEvent) : void {
                assertEquals(3, e.columns.length);

package org.postgresql.pegasus.functional {

    import org.flexunit.asserts.assertTrue;
    import org.flexunit.asserts.assertNull;
    import org.hamcrest.assertThatBoolean;
    import org.flexunit.asserts.fail;
    import org.postgresql.util.Assert;
    import org.postgresql.util.NumberUtil;
    import org.postgresql.util.DateUtil;
    import org.postgresql.db.IColumn;
    import org.postgresql.db.event.QueryCompletionEvent;
