You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Igor Sapego (Jira)" <ji...@apache.org> on 2021/02/14 21:52:00 UTC

[jira] [Created] (IGNITE-14174) Python thin: returns the time value + the client's time zone, instead of the time value from the database.

Igor Sapego created IGNITE-14174:
------------------------------------

             Summary: Python thin: returns the time value + the client's time zone, instead of the time value from the database.
                 Key: IGNITE-14174
                 URL: https://issues.apache.org/jira/browse/IGNITE-14174
             Project: Ignite
          Issue Type: Bug
            Reporter: Igor Sapego


The server is located in Europe, the client is in the Moscow time zone:
{code:python}
from pyignite import Client
from datetime import datetime

c = Client(username='', password='', use_ssl=False)
c.connect('35.158.109.154', 10800)
c.sql('create table test(key int primary key, date datetime)')
current_time = datetime.now()
c.sql(f"insert into test (key, date) VALUES (1, '{current_time}')")
for row in c.sql('SELECT date FROM test'):
    print(current_time, row[0][0])
c.close()
{code}
output:

{code:python}
2021-01-20 12:28:44.850381 2021-01-20 15:28:44.850000
{code}





--
This message was sent by Atlassian Jira
(v8.3.4#803005)