Skip to content

Commit 0e9528d

Browse files
authored
Update sensorml2iso.py
Corrected utc_code assignment in `get_stations_df()`, line 424, for `self.sos_type.lower() != 'ndbc'`. Set to blank character rather than None, because the string "None" was incorrectly being inserted into the eventTime string.
1 parent 4dc15be commit 0e9528d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sensorml2iso/sensorml2iso.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ def get_stations_df(self, sos_url, station_urns_sel=None):
421421

422422
# calculate event_time using self.getobs_req_hours:
423423
event_time_formatstr = "{begin:%Y-%m-%dT%H:%M:%S}{utc_code}/{end:%Y-%m-%dT%H:%M:%S}{utc_code}"
424-
utc_code = 'Z' if self.sos_type.lower() == 'ndbc' else None
424+
utc_code = 'Z' if self.sos_type.lower() == 'ndbc' else ''
425425
if station['starting'] is not None and station['ending'] is not None:
426426
event_time = event_time_formatstr.format(
427427
begin=station['ending'] - timedelta(hours=self.getobs_req_hours), end=station['ending'],

0 commit comments

Comments
 (0)