[
https://issues.apache.org/jira/browse/IGNITE-14174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Igor Sapego updated IGNITE-14174:
---------------------------------
Description:
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('x.x.x.x', 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}
was:
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}
> 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
> Priority: Major
>
> 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('x.x.x.x', 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)