Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Orekit
Orekit
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 54
    • Issues 54
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 3
    • Merge Requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Orekit
  • OrekitOrekit
  • Issues
  • #658

Closed
Open
Created Mar 02, 2020 by Evan Ward@evanward1Developer

Incorrect leap second handling in new AbsoluteDate(DateComponents, TimeComponents, TimeScale)

Failing test case below. Using the constructor AbsoluteDate(DateComponents, TimeComponents, TimeScale) adds one second when the time is during a leap second. Seems to be due to UTCScale.offsetToTAI expects that timeComponents is 23:59:60.5 during a leap second, but it is actually 24:00:00.5. So the bug might actually be in the TimeComponents constructor.

    @Test
    public void testLeap() {
        TimeScale utc = context.getTimeScales().getUTC();
        // During 2012 leap second
        final DateComponents dc = new DateComponents(DateComponents.MODIFIED_JULIAN_EPOCH, 56108);
        final TimeComponents tc = new TimeComponents(86400.5);
        final AbsoluteDate date = new AbsoluteDate(dc, tc, utc);
        final AbsoluteDate date1 = new AbsoluteDate(dc, utc).shiftedBy(86400.5);
        Assert.assertEquals(date, date1);
    }

Same as #247 (closed) but for the constructor. Strangely it seems that #247 (closed) was fixed by working around this bug in the constructor.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
10.2
Milestone
10.2
Assign milestone
Time tracking
None
Due date
None