From c3b7bafbd8514a350d4d419dce92177172800831 Mon Sep 17 00:00:00 2001 From: Adam Theisen Date: Thu, 6 May 2021 10:52:12 -0500 Subject: [PATCH 1/2] BUG: Bug fix for the add_dqr_to_qc. It was returning local times instead of utc times --- act/qc/arm.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/act/qc/arm.py b/act/qc/arm.py index ead1400ccd..14eedb62e7 100644 --- a/act/qc/arm.py +++ b/act/qc/arm.py @@ -83,6 +83,7 @@ def add_dqr_to_qc(obj, variable=None, assessment='incorrect,suspect', url += ''.join(['&searchmetric=', assessment, '&dqrfields=dqrid,starttime,endtime,metric,subject']) + print(url) # Call web service req = requests.get(url) @@ -106,8 +107,8 @@ def add_dqr_to_qc(obj, variable=None, assessment='incorrect,suspect', if include is not None and line[0] not in include: continue - line[1] = dt.datetime.fromtimestamp(int(line[1])) - line[2] = dt.datetime.fromtimestamp(int(line[2])) + line[1] = dt.datetime.utcfromtimestamp(int(line[1])) + line[2] = dt.datetime.utcfromtimestamp(int(line[2])) ind = np.where((time >= np.datetime64(line[1])) & (time <= np.datetime64(line[2]))) if len(ind[0]) == 0: continue From 0b7b3c48b2e9502e104cbba637f7dacb102667c6 Mon Sep 17 00:00:00 2001 From: Adam Theisen Date: Thu, 6 May 2021 12:32:22 -0500 Subject: [PATCH 2/2] ENH: Missed print statement --- act/qc/arm.py | 1 - 1 file changed, 1 deletion(-) diff --git a/act/qc/arm.py b/act/qc/arm.py index 14eedb62e7..7933200f0d 100644 --- a/act/qc/arm.py +++ b/act/qc/arm.py @@ -83,7 +83,6 @@ def add_dqr_to_qc(obj, variable=None, assessment='incorrect,suspect', url += ''.join(['&searchmetric=', assessment, '&dqrfields=dqrid,starttime,endtime,metric,subject']) - print(url) # Call web service req = requests.get(url)