In parse_obslog() in metadata.py, line 204 ingests a UTC string of the form YmdHMS (e.g. 20211016045736) that is already in UTC time. In line 218 of the same function, that UTC time is converted to a timestamp without regards for time zones, which ends up (when running this in Santa Barbara) to push the output utc.timestep() up by 7 (or 8, depending on time of year) hours.
def parse_obslog(file):
with open(file, 'r') as f:
lines = f.readlines()
dat = {}
for l in lines:
ldict = json.loads(l)
(204)utc = datetime.strptime(ldict['utc'], "%Y%m%d%H%M%S")
for k in ldict:
if k.upper() not in MEC_KEY_INFO:
continue
val = ldict[k]
try:
dat[k.upper()].add(utc.timestamp(), val)
except KeyError:
(218) dat[k.upper()] = MetadataSeries(times=[utc.timestamp()], values=[val])
return dat
In
parse_obslog()
inmetadata.py
, line 204 ingests a UTC string of the form YmdHMS (e.g. 20211016045736) that is already in UTC time. In line 218 of the same function, that UTC time is converted to a timestamp without regards for time zones, which ends up (when running this in Santa Barbara) to push the outpututc.timestep()
up by 7 (or 8, depending on time of year) hours.