From ed735af55d2c863cbe7cfde7b4ef3a9cda7c0733 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 12 Oct 2018 23:02:12 -0400 Subject: [PATCH] - get the "now" date for this test in terms of the database to accommodate for local timezone doesn't match that of the DB Change-Id: I0899d9294e8a2bd8f7f2c3e66cf396e2e8bd4bcc (cherry picked from commit 7405392299492c83e6fa1546d3b36f52042e3c5e) --- test/dialect/postgresql/test_dialect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/dialect/postgresql/test_dialect.py b/test/dialect/postgresql/test_dialect.py index 446765872e..4aa5ccec9b 100644 --- a/test/dialect/postgresql/test_dialect.py +++ b/test/dialect/postgresql/test_dialect.py @@ -181,8 +181,8 @@ class MiscBackendTest( "Can't infer the SQL type to use for an instance " "of org.python.core.PyObjectDerived.") def test_extract(self): - fivedaysago = datetime.datetime.now() \ - - datetime.timedelta(days=5) + fivedaysago = testing.db.scalar(select([func.now()])) - \ + datetime.timedelta(days=5) for field, exp in ('year', fivedaysago.year), \ ('month', fivedaysago.month), ('day', fivedaysago.day): r = testing.db.execute( -- 2.47.2