summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-06-29 11:08:07 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-06-29 11:08:07 -0400
commit3dde982171578cb843e453c232c3155674bb6d7b (patch)
treea4b682a601ae04f0bd32159b5de649148d36c118
parentd875f677a3f9c20d49d2569ae6f25beab6ce5f8e (diff)
downloadsqlalchemy-3dde982171578cb843e453c232c3155674bb6d7b.tar.gz
set UTC timezone on the connection here so we can get consistent results
-rw-r--r--test/dialect/postgresql/test_query.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/dialect/postgresql/test_query.py b/test/dialect/postgresql/test_query.py
index 9335c5bbc..ee5800db0 100644
--- a/test/dialect/postgresql/test_query.py
+++ b/test/dialect/postgresql/test_query.py
@@ -757,7 +757,12 @@ class ExtractTest(fixtures.TablesTest):
def utcoffset(self, dt):
return datetime.timedelta(hours=4)
- testing.db.execute(
+ conn = testing.db.connect()
+
+ # we aren't resetting this at the moment but we don't have
+ # any other tests that are TZ specific
+ conn.execute("SET SESSION TIME ZONE 0")
+ conn.execute(
cls.tables.t.insert(),
{
'dtme': datetime.datetime(2012, 5, 10, 12, 15, 25),
@@ -782,10 +787,8 @@ class ExtractTest(fixtures.TablesTest):
elif field == 'all+tz':
fields = {"year": 2012, "month": 5, "day": 10,
"epoch": 1336637725.0,
- "hour": 4,
- # can't figure out how to get a specific
- # tz into the DB
- #"timezone": -14400
+ "hour": 8,
+ "timezone": 0
}
else:
fields = field
@@ -827,7 +830,7 @@ class ExtractTest(fixtures.TablesTest):
def test_five(self):
t = self.tables.t
self._test(func.coalesce(t.c.dtme, func.current_timestamp()),
- overrides={"epoch": 1336666525.0})
+ overrides={"epoch": 1336652125.0})
def test_six(self):
t = self.tables.t