JayDeBeApi Date Time Zone Problems



I am having trouble with automatic time zone adjustments using Python and JayDeBeAPI.

I have a table defined like so:

\d base_level_predictions
CREATE TABLE base_level_predictions (
data_date DATE,
altitude INTEGER,
… )

When I interact with this table in mapdql, all is well. However, when using either Python or MapD Immerse, the data_date column is reported as a full datetime with time zone.

So, for example, a date inserted as the Python string “2017-04-22” reads as “Fri Apr 21 2017 17:00:00 GMT-0700 (PDT)” in Immerse, or as “2017-04-21” when selected from Python.

I’d like to be selecting in UTC rather than PDT, particularly in Python where there is nothing to indicate which time zone I’m selecting in. Is there a way to disable this automatic time zone conversion? From what I can tell based on Google searches, there is typically an option on the JDBC driver to handle this? I don’t see any option along this lines in the MapD documentation.



i got the same problem with the old python driver that returned the DATE as an int and did TZ conversion automatically

i have to convert in this way


i am talking about pure python driver anyway, but with the new release the DATE type is returned as a date without time portion, so maybe the JayDeBeAPI hasnt been updated