-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
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
Last modified field in collection is incorrect #2983
Comments
Hi @vinod-mortgagekart, thank you for letting us know about this issue. I have a few questions:
|
By client code I mean the code you used to insert consecutive records. |
Oh, got it. So I am using python. I use the kinto_http library for interacting with Kinto. To insert consecutive records, I used a loop inside which 'create_record' method was used. Example - client.create_record(id = None,data = data,bucket = "default",collection = "test_data") |
Oh, it's nice you've confirmed this happens with multiple clients! Can you also confirm that the Postgres database is configured to use UTC time zone? Also can you try your code again and share the timestamps you get? The two you shared are exactly 5.5 hours + 1 ms apart, so I'm curious if that's always the case. It would make sense that your Postgres DB is using India Standard Time since that's exactly 5.5 hours offset from UTC. |
Yes, the postgres database is configured for UTC timezone using the query - 'SET TIME ZONE 'UTC' . I tried inserting the 4 documents consecutively, and all of them are 5.5 hrs apart. |
The fact that each record is exactly 5.5 hours + 1 ms apart leads me to believe there's something wrong with either your Postgres configuration or your server configuration. When you run Kinto you should see output that starts with Also, can you run |
I am using Kinto on local server by installing on system. Kinto stores a 'last modified' data field whenever we insert a document in 'Kinto' collection. I found an issue with 'last modified' field whenever I inserted the data. The 'last modified' is an unix timestamp. I tried converting the unix timestamp to the Date format, and that doesn't matches with the time when the document was inserted. What's more fascinating is -
When I insert 2 documents consecutively, the 'last modified' timestamp when converted from unix to date format, varies hugely. Example -
new Date(1649841497793);
Wed Apr 13 2022 14:48:17 GMT+0530 (India Standard Time)
new Date(1649861297794);
Wed Apr 13 2022 20:18:17 GMT+0530 (India Standard Time)
The text was updated successfully, but these errors were encountered: