Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Orekit Orekit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 90
    • Issues 90
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Orekit
  • OrekitOrekit
  • Merge requests
  • !171

Fix DateTimeComponents.toString()

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Evan Ward requested to merge dtc-tostring-590 into develop Aug 09, 2021
  • Overview 0
  • Commits 2
  • Pipelines 2
  • Changes 4

Delegate to toStringRfc3339(). Previously toString() had three issues:

  • could not print times during leap seconds
  • could round up to invalid times when within 0.5 ms of the next minute
  • generated invalid ISO 8601 because it left out the time zone

The last point also lost information because the time zone information was never printed leading to two dates with the same local time having the same string representation.

The implementation in toStringRfc3339() fixes these issues for all reasonable dates, but is not backwards compatible with the existing implementation. In particular it will include the time zone information and emit more digits to avoid rounding up.

Fix #590 (closed)

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: dtc-tostring-590