We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to insert some DateTime data to CrateDB, but I'm getting an error.
The datetime I'm trying to insert looks so:
datetime
The column is a Timestamp with time zone column.
Timestamp with time zone
But I get this error:
File "/Users/chuckaguilar/PycharmProjects/postgres-cratedb-migration-tool/venv/lib/python3.7/site-packages/crate/client/http.py", line 82, in default delta = o - self.epoch TypeError: can't subtract offset-naive and offset-aware datetimes
But the CrateJsonEncoder (self.epoch) is naive:
CrateJsonEncoder
self.epoch
tzinfo is None
So... it won't work. Either I make my datetime naive, or the self.epoch gotta be aware.
The text was updated successfully, but these errors were encountered:
It'd work converting it to a string via datetime.strftime("%Y-%m-%dT%H:%M:%S.%f%z")
datetime.strftime("%Y-%m-%dT%H:%M:%S.%f%z")
thanks, @autophagy :)
Sorry, something went wrong.
Related to crate/sqlalchemy-cratedb#92
DateTime
No branches or pull requests
I'm trying to insert some DateTime data to CrateDB, but I'm getting an error.
The
datetime
I'm trying to insert looks so:The column is a
Timestamp with time zone
column.But I get this error:
But the
CrateJsonEncoder
(self.epoch
) is naive:tzinfo is None
So... it won't work. Either I make my datetime naive, or the
self.epoch
gotta be aware.The text was updated successfully, but these errors were encountered: