Code Monkey home page Code Monkey logo

Comments (6)

andipaetzold avatar andipaetzold commented on September 27, 2024

👋

I try to have a look at this issue in the coming days

from mdb-reader.

ellis2323 avatar ellis2323 commented on September 27, 2024

It's no emergency. I just report it. I'm sorry to have no time to fix myself.

from mdb-reader.

andipaetzold avatar andipaetzold commented on September 27, 2024

I read all dates of the database you provided and receive the following

const table = reader.getTable("tSerieTour");
const data = table.getData({columns: ['HoraireSerieTour']});
console.log(data)
  [
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: 1899-12-30T15:05:00.000Z },
      { HoraireSerieTour: 1899-12-30T14:30:00.000Z },
      { HoraireSerieTour: 1899-12-30T17:15:00.000Z },
      { HoraireSerieTour: 1899-12-30T16:50:00.000Z },
      { HoraireSerieTour: 1899-12-30T18:20:00.000Z },
      { HoraireSerieTour: 1899-12-30T18:05:00.000Z },
      { HoraireSerieTour: 1899-12-30T18:50:00.000Z },
      { HoraireSerieTour: 1899-12-30T18:35:00.000Z },
      { HoraireSerieTour: 1899-12-30T17:50:00.000Z },
      { HoraireSerieTour: 1899-12-30T17:40:00.000Z },
      { HoraireSerieTour: 1899-12-30T16:30:00.000Z },
      { HoraireSerieTour: 1899-12-30T16:30:00.000Z },
      { HoraireSerieTour: 1899-12-30T16:25:00.000Z },
      { HoraireSerieTour: 1899-12-30T16:20:00.000Z },
      { HoraireSerieTour: 1899-12-30T14:10:00.000Z },
      { HoraireSerieTour: 1899-12-30T14:00:00.000Z },
      { HoraireSerieTour: 1899-12-30T15:15:00.000Z },
      { HoraireSerieTour: 1899-12-30T16:50:00.000Z },
      { HoraireSerieTour: null },
      { HoraireSerieTour: 1899-12-30T14:30:00.000Z },
      { HoraireSerieTour: 1899-12-30T16:50:00.000Z },
      { HoraireSerieTour: 1899-12-30T14:10:00.000Z },
      { HoraireSerieTour: 1899-12-30T14:30:00.000Z },
      { HoraireSerieTour: 1899-12-30T14:30:00.000Z },
      { HoraireSerieTour: 1899-12-30T16:20:00.000Z },
      { HoraireSerieTour: 1899-12-30T16:00:00.000Z },
      { HoraireSerieTour: 1899-12-30T14:00:00.000Z },
      { HoraireSerieTour: 1899-12-30T15:00:00.000Z },
      { HoraireSerieTour: 1899-12-30T16:50:00.000Z },
      { HoraireSerieTour: 1899-12-30T16:00:00.000Z },
      { HoraireSerieTour: 1899-12-30T17:50:00.000Z },
      { HoraireSerieTour: null },
      { HoraireSerieTour: 1899-12-30T16:50:00.000Z },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null },
      { HoraireSerieTour: null }
    ]

All dates look fine to me.

I suspect that this is an issue with your setup. When you look at the date in the issue description (Sat Dec 30 1899 15:14:21 GMT+0009), it is in GMT+0009 timezone. So, it is 9 minutes off GMT. I don't know why that timezone is chosen when printing but the Date object should have the correct timestamp.

from mdb-reader.

ellis2323 avatar ellis2323 commented on September 27, 2024

Hello,

Effectively, there's something strange. Your date object has a good JSON date but the timezone is off.
I'm exploring to understand the problem. This is probably my fault. I will explore.

I don't understand clearly the problem. I solved my problem with a string export and remove the Z at the end. No more strange GMT.

  for (let d of data) {
    if (d.HoraireSerieTour) {
      console.log('strange', d.HoraireSerieTour.toJSON(), d.HoraireSerieTour.getHours(), d.HoraireSerieTour.getMinutes())
    }
  }

I have:

strange 1899-12-30T15:05:00.000Z 15 14
strange 1899-12-30T14:30:00.000Z 14 39
strange 1899-12-30T17:15:00.000Z 17 24
strange 1899-12-30T16:50:00.000Z 16 59
strange 1899-12-30T18:20:00.000Z 18 29
strange 1899-12-30T18:05:00.000Z 18 14
strange 1899-12-30T18:50:00.000Z 18 59
strange 1899-12-30T18:35:00.000Z 18 44
strange 1899-12-30T17:50:00.000Z 17 59
strange 1899-12-30T17:40:00.000Z 17 49
strange 1899-12-30T16:30:00.000Z 16 39
strange 1899-12-30T16:30:00.000Z 16 39
strange 1899-12-30T16:25:00.000Z 16 34
strange 1899-12-30T16:20:00.000Z 16 29
strange 1899-12-30T14:10:00.000Z 14 19
strange 1899-12-30T14:00:00.000Z 14 9
strange 1899-12-30T15:15:00.000Z 15 24
strange 1899-12-30T16:50:00.000Z 16 59
strange 1899-12-30T14:30:00.000Z 14 39
strange 1899-12-30T16:50:00.000Z 16 59
strange 1899-12-30T14:10:00.000Z 14 19
strange 1899-12-30T14:30:00.000Z 14 39
strange 1899-12-30T14:30:00.000Z 14 39
strange 1899-12-30T16:20:00.000Z 16 29
strange 1899-12-30T16:00:00.000Z 16 9
strange 1899-12-30T14:00:00.000Z 14 9
strange 1899-12-30T15:00:00.000Z 15 9
strange 1899-12-30T16:50:00.000Z 16 59
strange 1899-12-30T16:00:00.000Z 16 9
strange 1899-12-30T17:50:00.000Z 17 59
strange 1899-12-30T16:50:00.000Z 16 59

from mdb-reader.

andipaetzold avatar andipaetzold commented on September 27, 2024

Even though this looks odd, this is probably the correct behavior. Feel free to reopen the issue if you think this is actually an issue with the library.

from mdb-reader.

ellis2323 avatar ellis2323 commented on September 27, 2024

Ok. Best regards!

from mdb-reader.

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.