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

No longer formatting microseconds into SSA time literals #351

Merged
merged 1 commit into from
Sep 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion pyvo/dal/ssa.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,15 @@ def time(self, time):
except TypeError:
raise valerr

# It seems astropy either has seconds and microseconds (the date_hms
# subformat) or no seconds at all (the date_hm subformat). SSAP
# probably doesn't allow microseconds. Rather than fix this
# via a new astropy subformat, let's get by with local string
# operations.
literals = time.to_value('isot')
self["TIME"] = "{start}/{end}".format(
start=time.isot[0], end=time.isot[1])
start=literals[0].split(".")[0],
end=literals[1].split(".")[0])

@time.deleter
def time(self):
Expand Down