Code Monkey home page Code Monkey logo

Comments (7)

dstaley avatar dstaley commented on June 8, 2024

Hi @vinod-mortgagekart, thank you for letting us know about this issue. I have a few questions:

  1. What operating system are you running Kinto server on?
  2. What database are you using Kinto with (memory or Postgres)? If Postgres, what operating system is the database running on?
  3. Can you provide your kinto.ini config for your server? Please redact any sensitive details.
  4. Can you provide the client code you're using to create these records?

from kinto.

vinod-mortgagekart avatar vinod-mortgagekart commented on June 8, 2024

Hi @dstaley , thanks for the response.

  1. I am running Kinto on Ubuntu system
  2. Postgres Database, the database is also running on ubuntu
  3. kinto.txt
  4. I am actually not sure, what do you mean by client code?

from kinto.

dstaley avatar dstaley commented on June 8, 2024

By client code I mean the code you used to insert consecutive records.

from kinto.

vinod-mortgagekart avatar vinod-mortgagekart commented on June 8, 2024

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")
But, I don't think it's language dependent, as we are getting the same error using node.js

from kinto.

dstaley avatar dstaley commented on June 8, 2024

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.

from kinto.

vinod-mortgagekart avatar vinod-mortgagekart commented on June 8, 2024

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.
1st - 1650557896877 - (Thursday, 21 April 2022 16:18:16.877) GMT
2nd - 1650577696878 - (Thursday, 21 April 2022 21:48:16.878) GMT
3rd - 1650597496879 - (Friday, 22 April 2022 03:18:16.879) GMT
4th - 1650617296880 - (Friday, 22 April 2022 08:48:16.880) GMT
'

from kinto.

dstaley avatar dstaley commented on June 8, 2024

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 INFO [kinto.core] Running kinto 14.6.1. Can you check to see if that log has any mention of timezone issues? We recommend using ALTER DATABASE to set the timezone, so if you haven't done that give that a try.

Also, can you run SELECT last_modified FROM objects; to confirm that the timestamp in Postgres is matching the values being returned by the Kinto API?

from kinto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.