Giter Club home page Giter Club logo

Comments (3)

j256 avatar j256 commented on July 17, 2024

Sorry for the long delay. Wow. Time under Android has been a real problem to keep up with. I've noted for some time that the SSSSSS should have been SSS but to change this would complete break backwards compatibility. You can certainly specify your own format although I'm not sure what .SSS would do with .321000 or .000321.

Maybe the right thing to do here is to support a persister that extends the DateStringType and sees if the date is a .SSSSSS and handles it but also handles .SSS and writes new dates as .SSS.

Comments?

from ormlite-android.

Diederikjh avatar Diederikjh commented on July 17, 2024

That will probably work for backwards compatibility. My only worry is the performance impact of doing the check on each read?

From what I've seen the reads of .321000 reads as .321 and 0.000321 reads as .000 when the date format is set to .SSS.

My solution to this was to simply use .SSS for all my date fields and upgrade my DB to the new format (always fun to write string manipulations in SQLite)

from ormlite-android.

j256 avatar j256 commented on July 17, 2024

The detection of the 6 versus 3 digits and the position of the zeros is nothing compared to the work needed to convert the string date into a java Date. I'm going to add it as a type.

from ormlite-android.

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.