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

Ticktock should parse ISO strings of GPS and TAI #743

Open
jtniehof opened this issue May 22, 2024 · 0 comments
Open

Ticktock should parse ISO strings of GPS and TAI #743

jtniehof opened this issue May 22, 2024 · 0 comments

Comments

@jtniehof
Copy link
Member

We assume ISO timestrings are always UTC, and we deal with GPS time and TAI as continuous numbers only. Astronomers have the annoying habit :) of representing TAI as a YYYY-MM-DD HH:MM:SS style
timestring. It would be nice to be able to parse these in a situation like:

tt = spacepy.time.Ticktock(['2020-01-01T01:02'], dtype='TAI')

Right now this assumes the timestring is in UTC despite the dtype!

spacepy.time.Ticktock(['2020-01-01T01:02'], dtype='TAI').UTC
# dmarray([datetime.datetime(2020, 1, 1, 1, 2)], dtype=object)

We can of course do similar for GPS time. In both cases we could basicaly do ISO-style parsing with a fixed number of leapseconds (0 for TAI, 19 for GPS if I'm keeping head on straight).

This is going a little ways down the AstroPy route of separating timescale and format, but it seems a reasonable small enhancement.

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

1 participant