Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Bug: DateTimes are not inserted into the database correctly #37

Closed
Du-z opened this issue Sep 21, 2022 · 8 comments
Closed

Bug: DateTimes are not inserted into the database correctly #37

Du-z opened this issue Sep 21, 2022 · 8 comments
Labels
bug Something isn't working resolved The issue is resolved. Waiting for release

Comments

@Du-z
Copy link
Collaborator

Du-z commented Sep 21, 2022

Continuation of #25

Datetimes still are inserted with the fraction portion of the date prepended with two zeros. Tests seem to work as expected, despite the data being wrong.

image

@Du-z Du-z added the bug Something isn't working label Sep 21, 2022
@ProphetLamb
Copy link
Collaborator

Thanks for the report, I've read the discussion on discord about this bug.

I reviewed the current implementation and found the following issues in addition to your report:

  1. The current implementation for DateTime is entirely based on serializing a DateOnly followed by a TimeOnly.
  2. All DateTime and DateTimeOffset instances are converted to UTC (Z suffix) serializing a specific timezone (+02 or -06) is not supported.
  3. The serializer cannot handle integers represented in variable length, e.g. 4 instead of 04.

@StephenGilboy
Copy link

This should be fixed in SurrealDB now. surrealdb/surrealdb#250

@ProphetLamb
Copy link
Collaborator

True, sadly, the changeset is not in the current beta release.
We could change our CI to compile SurrealDB from source, but that doesn't represent the average user. So we'll have to wait with the issue, until the next surrealdb release :(

@tobiemh do you have any information on the release schedule of SurrealDB? Is there a high velocity release channel, something like nightly/weekly, in the works?

@Du-z
Copy link
Collaborator Author

Du-z commented Sep 22, 2022

We can this bug open (tagged as blocked maybe?) and keep the tests commented. When the the update rolls out we can un-comment them and close this issue.

@ProphetLamb ProphetLamb added the blocked Work on this issue is blocked until further notice label Sep 22, 2022
@ProphetLamb
Copy link
Collaborator

Blocked until surrealdb/surrealdb#250 is in release

@tobiemh
Copy link

tobiemh commented Sep 22, 2022

Hi @ProphetLamb , I've added a nightly release so that the main branch is released daily. This should be going live midnight tonight UTC time!

@ProphetLamb
Copy link
Collaborator

Neat! Thanks a lot, makes developing much easier.

@ProphetLamb
Copy link
Collaborator

Solved with #52

@ProphetLamb ProphetLamb added resolved The issue is resolved. Waiting for release and removed blocked Work on this issue is blocked until further notice labels Sep 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working resolved The issue is resolved. Waiting for release
Projects
None yet
Development

No branches or pull requests

4 participants