Conversation
… RFC3339 formatting
…me for gps to unix and unix to gps conversion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking
convert_gpstime_to_unixtimeandconvert_unixtime_to_gpstime(inmisc, and re-exported at the crate root) no longer takemwa_start_gpstime_ms/mwa_start_unixtime_msreference parameters - they are nowconvert_gpstime_to_unixtime(gpstime_ms: u64)andconvert_unixtime_to_gpstime(unixtime_ms: u64). Internally they now convert viahifitime's leap-second table instead of a flat per-observation offset, which also removes the previous assumption that an observation could never span a leap second boundary.chronohas been removed entirely.MetafitsContext::sched_start_utc/sched_end_utcandVoltageBeam::modtimeare nowjiff::Timestampinstead ofchrono::DateTime<FixedOffset>.jiff::Timestamp.MetafitsContext'sDisplayoutput now printsScheduled start (utc)andScheduled end (utc)usingjiff::Timestamp's ownDisplay, which is genuine RFC3339 (e.g.2014-12-01T21:08:16Z) - unlikechrono's defaultDisplayformat (2014-12-01 21:08:16 +00:00, space-separated and not itself RFC3339-compliant). This is a deliberate move to a standards-compliant format.datetime.datetimeobjects with no change to the Python-visible type or semantics.jiff::Timestampalready has workingIntoPyObject/FromPyObjectviapyo3's ownjiff-02feature (the same mechanismchronopreviously used).time_t, computed the same way (seconds since the UNIX epoch, now viaTimestamp::as_second()instead ofchrono's.timestamp()).Changed
hifitimeas a dependency to back the above leap-second-aware conversions.jiffas a dependency so the field types onMetafitsContext/VoltageBeamare consistent regardless of which features are enabled to back thechronoremoval above.hifitimeandjiffserve different purposes in mwalib:hifitimefor leap-second/GPS-time-scale-aware arithmetic,jifffor the plain UTC timestamp fields that need to interoperate cleanly with Python'sdatetime.datetime.