diff --git a/geomagio/api/xml/XMLFactory.py b/geomagio/api/xml/XMLFactory.py index 4e6850de9180dd511cf76c27977c763e90f04958..d5a63f710a4f036683dc06e4024043150a75126c 100644 --- a/geomagio/api/xml/XMLFactory.py +++ b/geomagio/api/xml/XMLFactory.py @@ -10,19 +10,9 @@ class XMLFactory(TimeseriesFactory): def __init__( self, - time_format="iso8601", # could be "iso8601" or "numeric" **kwargs, ): - """ - Parameters - ---------- - time_format : {"iso8601", "numeric"} - - "iso8601": each time value is an ISO8601 string - - "numeric": each time value is numeric (epoch milliseconds) - - """ super().__init__(**kwargs) - self.time_format = time_format def parse_string(self, data: str, **kwargs): """ @@ -67,13 +57,10 @@ class XMLFactory(TimeseriesFactory): start_time_str = description.findtext("StartTime", default="") sample_period = float(description.findtext("SamplePeriod", default="60000")) - if self.time_format == "numeric": - starttime = UTCDateTime(float(start_time_str) / 1000.0) - else: - try: - starttime = UTCDateTime(start_time_str) - except Exception: - starttime = UTCDateTime() + try: + starttime = UTCDateTime(start_time_str) + except Exception: + starttime = UTCDateTime() # Parse Data data_element = root.find("Data")