We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d71d581 commit 6c34c7aCopy full SHA for 6c34c7a
tests/test_db.py
@@ -750,3 +750,18 @@ def test_mysql_datetime():
750
print(df)
751
print(df.info(verbose=True))
752
assert df.shape == (1, 4)
753
+
754
755
+def test_mysql_session_timezone():
756
+ engine0 = wr.catalog.get_engine(
757
+ connection="aws-data-wrangler-mysql", connect_args={"init_command": "SET SESSION time_zone='+00:00'"}
758
+ )
759
760
+ engine1 = wr.catalog.get_engine(
761
+ connection="aws-data-wrangler-mysql", connect_args={"init_command": "SET SESSION time_zone='-03:00'"}
762
763
764
+ df0 = wr.db.read_sql_query("SELECT HOUR(NOW()) AS hour", engine0)
765
+ df1 = wr.db.read_sql_query("SELECT HOUR(NOW()) AS hour", engine1)
766
767
+ assert df0.hour.iloc[0] - df1.hour.iloc[0] == 3
0 commit comments