Skip to content

Commit

Permalink
Merge pull request #351 from astropy/no-milliseconds-in-ssap
Browse files Browse the repository at this point in the history
No longer formatting microseconds into SSA time literals
  • Loading branch information
tomdonaldson authored Sep 18, 2022
2 parents 0035713 + 4cc94ec commit 249114f
Showing 1 changed file with 8 additions and 1 deletion.
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

0 comments on commit 249114f

Please sign in to comment.