From 4cc94ecc418153084ef454ce904ec795512946c2 Mon Sep 17 00:00:00 2001 From: Markus Demleitner Date: Tue, 16 Aug 2022 09:30:38 +0200 Subject: [PATCH] No longer formatting microseconds into SSA time literals --- pyvo/dal/ssa.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pyvo/dal/ssa.py b/pyvo/dal/ssa.py index a1fc53138..9c0c79200 100644 --- a/pyvo/dal/ssa.py +++ b/pyvo/dal/ssa.py @@ -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):