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
Here is how Date objects are encoded right now:
Date
if (v instanceof Date) return ('' + v.valueOf()).substr(0, 10)
This code has two problems.
First, it expects timestamp to have exactly 13 digits, which is wrong:
> ('' + new Date('2000-01-01').valueOf()).substr(0, 10) '9466848000' > ('' + new Date('2022-01-01').valueOf()).substr(0, 10) '1640995200'
Second, it sends timestamps as strings which only works with DateTime type, but not with Date:
DateTime
SELECT toDateTime(1661353838), toDate(1661353838), toDateTime('1661353838'), toDate('1661353838')
┌─toDateTime(1661353838)─┬─toDate(1661353838)─┬─toDateTime('1661353838')─┬─toDate('1661353838')─┐ │ 2022-08-24 18:10:38 │ 2022-08-24 │ 2022-08-24 18:10:38 │ 1970-01-01 │ └────────────────────────┴────────────────────┴──────────────────────────┴──────────────────────┘
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Here is how
Date
objects are encoded right now:This code has two problems.
First, it expects timestamp to have exactly 13 digits, which is wrong:
Second, it sends timestamps as strings which only works with
DateTime
type, but not withDate
:The text was updated successfully, but these errors were encountered: