Skip to content
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

JulianDate issues parsing some dates... #405

Closed
mramato opened this issue Dec 19, 2012 · 3 comments
Closed

JulianDate issues parsing some dates... #405

mramato opened this issue Dec 19, 2012 · 3 comments
Assignees

Comments

@mramato
Copy link
Contributor

mramato commented Dec 19, 2012

I'm not sure why, but the date 11/17/2039 12:00:00 AM UTC produces a JulianDate that is off by one day (November 16 instead of 17). The problem appears to be in computeJulianDateComponents and is most likely a rounding error. I was able to fix the error (by re-porting some Components code) but that caused other tests to start failing (seemingly due to a rounding error in the other direction). The below test should pass, but doesn't.

it('Construct problem dates', function() {
        var expectedDate = new JulianDate(2466109, 43235.0, TimeStandard.TAI);
        var date = JulianDate.fromDate(new Date('11/17/2039 12:00:00 AM UTC'));
        expect(date).toEqual(expectedDate);
    });
@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 25, 2014

@mramato is this still an issue after #1821?

@mramato
Copy link
Contributor Author

mramato commented Jun 25, 2014

Unfortunately, yes. I have no idea why. I spent some time looking into it and the first "bad" date is 03/01/2034 12:00:00 AM UTC, everything before that works as expected.

slozier added a commit to slozier/cesium that referenced this issue Aug 18, 2015
slozier added a commit to slozier/cesium that referenced this issue Aug 18, 2015
mramato added a commit that referenced this issue Aug 18, 2015
@pjcozzi
Copy link
Contributor

pjcozzi commented Aug 18, 2015

Fixed in #2949

@pjcozzi pjcozzi closed this as completed Aug 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants